CloneDigger Report

Source files: 12

Click here to show/hide file names

Source files:
report/html.py,
report/table.py,
report/reportables.py,
report/results.py,
report/generation.py,
report/__init__.py,
report/formatter.py,
report/latex.py,
report/resultcache.py,
report/plotting.py,
report/figure.py,
report/ppt.py

Clones detected: 236

1928 of 5060 lines are duplicates (38.10%)

Parameters
clustering_threshold = 10
distance_threshold = 5
size_threshold = 5
hashing_depth = 1
clusterize_using_hash = False
clusterize_using_dcup = False

Time elapsed
Construction of AST : 1.45 seconds
Building statement hash : 0.01 seconds
Building patterns : 3.38 seconds
Marking similar statements : 5.24 seconds
Finding similar sequences of statements : 0.59 seconds
Refining candidates : 5.61 seconds
Total time: 16.28
Started at: Mon Aug 1 06:56:49 2016
Finished at: Mon Aug 1 06:57:01 2016

Clone # 1
Distance between two fragments = 3
Clone size = 27

Source file "report/results.py" The first line is 3337 |  | Source file "report/results.py" The first line is 1567
qtys['settoggles'] += "\\toggle%s{LsAndGermsSet}\n" % \ ("true" if self._LsAndGermInfoSet else "false") |  | qtys['settoggles'] += "\\toggle%s{whackamoleappendix}\n" % \ ("true" if whackamoleAppendix else "false")
qtys['confidenceLevel'] = "%g" % \ confidenceLevel if confidenceLevel is not None else "NOT-SET" |  | qtys['confidenceLevel'] = "%g" % \ confidenceLevel if confidenceLevel is not None else "NOT-SET"
qtys['linlg_pcntle'] = self.parameters['linlogPercentile'] |  | qtys['linlg_pcntle'] = self.parameters['linlogPercentile']
if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET' |  | if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET'
pdfInfo = [('Author', 'pyGSTi'), ('Title', title), ('Keywords', 'GST'), ('pyGSTi Version', _version.__version__), ('opt_long_tables', self.options.long_tables), ('opt_table_class', self.options.table_class), ('opt_template_path', self.options.template_path), ('opt_latex_cmd', self.options.latex_cmd)] |  | pdfInfo = [('Author', 'pyGSTi'), ('Title', title), ('Keywords', 'GST'), ('pyGSTi Version', _version.__version__), ('opt_long_tables', self.options.long_tables), ('opt_table_class', self.options.table_class), ('opt_template_path', self.options.template_path), ('opt_latex_cmd', self.options.latex_cmd)]
for key in sorted(list(self.parameters.keys())): pdfInfo.append((key, self.parameters[key])) |  | for key in sorted(list(self.parameters.keys())): pdfInfo.append((key, self.parameters[key]))
qtys['pdfinfo'] = _to_pdfinfo(pdfInfo) |  | qtys['pdfinfo'] = _to_pdfinfo(pdfInfo)
D = (report_base) + ('_files') |  | D = (report_base) + ('_files')
if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D)) |  | if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D))
printer.log('*** Generating tables ***') |  | printer.log('*** Generating tables ***')

Clone # 2
Distance between two fragments = 2
Clone size = 26

Source file "report/results.py" The first line is 2796 |  | Source file "report/results.py" The first line is 2394
def set_fig_qtys(figkey, figFilenm, v, W=None, H=None): fig = self.figures.get(figkey, verbosity=v) fig.save_to(_os.path.join(report_dir, D, figFilenm)) qtys[figkey] = incgr(figFilenm, W, H) qtys[('tt_') + (figkey)] = tooltiptext((".figures['%s']") % (figkey)) return fig |  | def set_fig_qtys(figkey, figFilenm, v, W=None, H=None): fig = self.figures.get(figkey, verbosity=v) fig.save_to(_os.path.join(report_dir, D, figFilenm)) qtys[figkey] = incgr(figFilenm, W, H) qtys[('tt_') + (figkey)] = tooltiptex((".figures['%s']") % (figkey)) return fig
if self._LsAndGermInfoSet: baseStr_dict = self._getBaseStrDict() Ls = self.parameters['max length list'] st = 1 if Ls[0] == 0 else 0 #start index: skip LGST col in box plots nPlots = (len(Ls[st:])-1)+1 if pixelPlotAppendix else 1 if self.parameters['objective'] == "chi2": plotFnName,plotFnLatex = "Chi2", "$\chi^2$" elif self.parameters['objective'] == "logl": plotFnName,plotFnLatex = "LogL", "$\\log(\\mathcal{L})$" else: raise ValueError("Invalid objective value: %s" \ % self.parameters['objective']) printer.log(" -- %s plots (%d): " % (plotFnName, nPlots), end='') with printer.progress_logging(1): printer.show_progress(0, 0, prefix='', end='') fig = set_fig_qtys("bestEstimateColorBoxPlot", "best%sBoxes.png" % plotFnName, printer - 1) maxX = fig.get_extra_info()['nUsedXs'] maxY = fig.get_extra_info()['nUsedYs'] else: for figkey in ["bestEstimateColorBoxPlot"]: qtys[figkey] = qtys["tt_"+figkey] = "" |  | if self._LsAndGermInfoSet: baseStr_dict = self._getBaseStrDict() Ls = self.parameters['max length list'] st = 1 if Ls[0] == 0 else 0 #start index: skip LGST col in box plots nPlots = (len(Ls[st:])-1)+1 if pixelPlotAppendix else 1 if self.parameters['objective'] == "chi2": plotFnName,plotFnLatex = "Chi2", "$\chi^2$" elif self.parameters['objective'] == "logl": plotFnName,plotFnLatex = "LogL", "$\\log(\\mathcal{L})$" else: raise ValueError("Invalid objective value: %s" % self.parameters['objective']) printer.log(" -- %s plots (%d): " % (plotFnName, nPlots), end='') with printer.progress_logging(1): printer.show_progress(0, 0, prefix='', end='') fig = set_fig_qtys("bestEstimateColorBoxPlot", "best%sBoxes.pdf" % plotFnName, printer - 1) maxX = fig.get_extra_info()['nUsedXs'] maxY = fig.get_extra_info()['nUsedYs'] else: for figkey in ["bestEstimateColorBoxPlot"]: qtys[figkey] = qtys["tt_"+figkey] = ""

Clone # 3
Distance between two fragments = 3
Clone size = 26

Source file "report/plotting.py" The first line is 3092 |  | Source file "report/plotting.py" The first line is 2911
if fidPairs is None: gatestringsToWhack = [((prepStr) + (gatestringToWhack)) + (effectStr) for prepStr in prepStrs for effectStr in effectStrs ] else: gatestringsToWhack = [((prepStrs[i]) + (gatestringToWhack)) + (effectStrs[j]) for i, j in fidPairs ] |  | if fidPairs is None: gatestringsToWhack = [((prepStr) + (gatestringToWhack)) + (effectStr) for prepStr in prepStrs for effectStr in effectStrs ] else: gatestringsToWhack = [((prepStrs[i]) + (gatestringToWhack)) + (effectStrs[j]) for i, j in fidPairs ]
whacked_indices = [allGatestringsUsedInLogLOpt.index(s) for s in gatestringsToWhack ] |  | whacked_indices = [allGatestringsUsedInChi2Opt.index(s) for s in gatestringsToWhack ]
whacked_DlogL = _np.take(DlogL, whacked_indices, axis=1) |  | whacked_Dchi2 = _np.take(Dchi2, whacked_indices, axis=1)
grad = (-1.0) * (_np.sum(whacked_DlogL, axis=(0, 1))) |  | grad = (-1.0) * (_np.sum(whacked_Dchi2, axis=(0, 1)))
dx = ((whackWith) * (grad)) / (_np.dot(grad, grad)) |  | dx = ((whackWith) * (grad)) / (_np.dot(grad, grad))
delta = _np.sum(_np.dot(DlogL, dx), axis=0) |  | delta = _np.sum(_np.dot(Dchi2, dx), axis=0)
def mx_fn(gateStr): if gateStr is None: return (_np.nan) * (_np.zeros((len(effectStrs), len(prepStrs)), 'd')) if fidPairs is None: return _np.array([[delta[allGatestringsUsedInLogLOpt.index(((prepStr) + (gateStr)) + (effectStr))] for prepStr in prepStrs ] for effectStr in effectStrs ]) else: ret = (_np.nan) * (_np.ones((len(effectStrs), len(prepStrs)), 'd')) for i, j in fidPairs: ret[j,i] = delta[allGatestringsUsedInLogLOpt.index(((prepStrs[i]) + (gateStr)) + (effectStrs[j]))] return ret |  | def mx_fn(gateStr): if gateStr is None: return (_np.nan) * (_np.zeros((len(effectStrs), len(prepStrs)), 'd')) if fidPairs is None: return _np.array([[delta[allGatestringsUsedInChi2Opt.index(((prepStr) + (gateStr)) + (effectStr))] for prepStr in prepStrs ] for effectStr in effectStrs ]) else: ret = (_np.nan) * (_np.ones((len(effectStrs), len(prepStrs)), 'd')) for i, j in fidPairs: ret[j,i] = delta[allGatestringsUsedInChi2Opt.index(((prepStrs[i]) + (gateStr)) + (effectStrs[j]))] return ret
xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp) |  | xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp)
max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ]) |  | max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ])
m = -max_abs if m is None else m |  | m = -max_abs if m is None else m
M = +max_abs if M is None else M |  | M = +max_abs if M is None else M
stdcmap = StdColormapFactory('div', n_boxes=n_boxes, vmin=m, vmax=M, dof=dof, midpoint=0) |  | stdcmap = StdColormapFactory('div', n_boxes=n_boxes, vmin=m, vmax=M, dof=dof, midpoint=0)
return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$') |  | return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$')

Clone # 4
Distance between two fragments = 4
Clone size = 23

Source file "report/results.py" The first line is 859 |  | Source file "report/results.py" The first line is 831
expr3 = 'whack(.+?)MoleBoxesSummed' |  | expr2 = 'whack(.+?)MoleBoxes'
def fn(key, confidenceLevel, vb): noConfidenceLevelDependence(confidenceLevel) Ls, germs, gsBest, fidPairs, _, _, baseStr_dict, strs, st = plot_setup() highestL = Ls[-1] hammerWeight = 10.0 mpc = getMPC() gateLabel = _re.match(expr3, key).group(1) strToWhack = _gs.GateString(((gateLabel)) * (highestL)) whackAMolePlotFn = getWhackAMolePlotFn() return whackAMolePlotFn(strToWhack, self.gatestring_lists['all'], Ls[st:], germs, baseStr_dict, self.dataset, gsBest, strs, '$L$', 'germ', scale=1.0, sumUp=True, title='', whackWith=hammerWeight, save_to='', minProbClipForWeighting=mpc, ticSize=20, fidPairs=fidPairs) |  | def fn(key, confidenceLevel, vb): noConfidenceLevelDependence(confidenceLevel) Ls, germs, gsBest, fidPairs, _, _, baseStr_dict, strs, st = plot_setup() highestL = Ls[-1] hammerWeight = 10.0 mpc = getMPC() gateLabel = _re.match(expr2, key).group(1) strToWhack = _gs.GateString(((gateLabel)) * (highestL)) whackAMolePlotFn = getWhackAMolePlotFn() return whackAMolePlotFn(strToWhack, self.gatestring_lists['all'], Ls[st:], germs, baseStr_dict, self.dataset, gsBest, strs, '$L$', 'germ', scale=1.0, sumUp=False, title='', whackWith=hammerWeight, save_to='', minProbClipForWeighting=mpc, ticSize=20, fidPairs=fidPairs)
def fn_validate(key): if not self._LsAndGermInfoSet: return [] len1GermFirstEls = [g[0] for g in self.gatestring_lists['germs'] if len(g) == 1] keys = [('whack%sMoleBoxesSummed') % (gl) for gl in len1GermFirstEls ] if key == expr3: return keys elif key in keys: return [key] else: return [] |  | def fn_validate(key): if not self._LsAndGermInfoSet: return [] len1GermFirstEls = [g[0] for g in self.gatestring_lists['germs'] if len(g) == 1] keys = [('whack%sMoleBoxes') % (gl) for gl in len1GermFirstEls ] if key == expr2: return keys elif key in keys: return [key] else: return []
fns[expr3] = (fn, fn_validate) |  | fns[expr2] = (fn, fn_validate)

Clone # 5
Distance between two fragments = 0
Clone size = 23

Source file "report/results.py" The first line is 3276 |  | Source file "report/results.py" The first line is 1498
if tips: def tooltiptex(directive): return ((('\\pdftooltip{{\\color{blue}\\texttt{%s}}\\quad}') % (directive)) + ('{Access this information in pyGSTi via')) + (('%s}') % (directive)) else: def tooltiptex(directive): return '' |  | if tips: def tooltiptex(directive): return ((('\\pdftooltip{{\\color{blue}\\texttt{%s}}\\quad}') % (directive)) + ('{Access this information in pyGSTi via')) + (('%s}') % (directive)) else: def tooltiptex(directive): return ''
default_dir = self.parameters['defaultDirectory'] |  | default_dir = self.parameters['defaultDirectory']
default_base = self.parameters['defaultBasename'] |  | default_base = self.parameters['defaultBasename']
if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] \ + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) \ else "GSTReport" report_base += suffix |  | if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] \ + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) \ else "GSTReport" report_base += suffix
if datasetLabel == 'auto': if default_base is not None: datasetLabel = _latex.latex_escaped(default_base) else: datasetLabel = '$\\mathcal{D}$' |  | if datasetLabel == 'auto': if default_base is not None: datasetLabel = _latex.latex_escaped(default_base) else: datasetLabel = '$\\mathcal{D}$'
if title == 'auto': title = ('GST report for %s') % (datasetLabel) |  | if title == 'auto': title = ('GST report for %s') % (datasetLabel)

Clone # 6
Distance between two fragments = 2
Clone size = 22

Source file "report/latex.py" The first line is 199 |  | Source file "report/html.py" The first line is 208
TOL = 1e-09 |  | TOL = 1e-09
def render(x): if abs(x) < (5) * ((10) ** (-(precision) + (1))): s = ('%.0e') % (x) elif abs(x) < 1: s = ('%.*f') % ((precision, x)) elif abs(x) <= (10) ** (precision): s = ('%.*f') % (((precision) - (int(_np.log10(abs(x)))), x)) else: s = ('%.0e') % (x) p = s.split('e') if len(p) == 2: ex = str(int(p[1])) s = (((p[0]) + ('\\e{')) + (ex)) + ('}') if '.' in s: while s.endswith('0'): s = s[:-1] if s.endswith('.'): s = s[:-1] return s |  | def render(x): if abs(x) < (5) * ((10) ** (-(precision) + (1))): s = ('%.0e') % (x) elif abs(x) < 1: s = ('%.*f') % ((precision, x)) elif abs(x) <= (10) ** (precision): s = ('%.*f') % (((precision) - (int(_np.log10(abs(x)))), x)) else: s = ('%.0e') % (x) p = s.split('e') if len(p) == 2: ex = str(int(p[1])) s = (((p[0]) + ('×10')) + (ex)) + ('') if '.' in s: while s.endswith('0'): s = s[:-1] if s.endswith('.'): s = s[:-1] return s
if isinstance(el, basestring): return el |  | if isinstance(el, basestring): return el
if type(el) in (int, _np.int64): return ('%d') % (el) |  | if type(el) in (int, _np.int64): return ('%d') % (el)
if (el is None) or (_np.isnan(el)): return '--' |  | if (el is None) or (_np.isnan(el)): return '--'

Clone # 7
Distance between two fragments = 4
Clone size = 22

Source file "report/results.py" The first line is 2037 |  | Source file "report/results.py" The first line is 2311
qtys['gofObjective'] = "$2\\Delta\\log{\\mathcal{L}}$" \ if obj == "logl" else "$\\chi^2$" |  | qtys['gofObjective'] = "$2\\Delta\\log{\\mathcal{L}}$" \ if self.parameters['objective'] == "logl" else "$\\chi^2$"
if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET' |  | if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET'
pdfInfo = [('Author', 'pyGSTi'), ('Title', title), ('Keywords', 'GST'), ('pyGSTi Version', _version.__version__), ('opt_long_tables', self.options.long_tables), ('opt_table_class', self.options.table_class), ('opt_template_path', self.options.template_path), ('opt_latex_cmd', self.options.latex_cmd)] |  | pdfInfo = [('Author', 'pyGSTi'), ('Title', title), ('Keywords', 'GST'), ('pyGSTi Version', _version.__version__), ('opt_long_tables', self.options.long_tables), ('opt_table_class', self.options.table_class), ('opt_template_path', self.options.template_path), ('opt_latex_cmd', self.options.latex_cmd)]
for key in sorted(list(self.parameters.keys())): pdfInfo.append((key, self.parameters[key])) |  | for key in sorted(list(self.parameters.keys())): pdfInfo.append((key, self.parameters[key]))
qtys['pdfinfo'] = _to_pdfinfo(pdfInfo) |  | qtys['pdfinfo'] = _to_pdfinfo(pdfInfo)
D = (report_base) + ('_files') |  | D = (report_base) + ('_files')
if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D)) |  | if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D))
printer.log('*** Generating tables ***') |  | printer.log('*** Generating tables ***')

Clone # 8
Distance between two fragments = 2
Clone size = 23

Source file "report/results.py" The first line is 3276 |  | Source file "report/results.py" The first line is 1974
if tips: def tooltiptex(directive): return ((('\\pdftooltip{{\\color{blue}\\texttt{%s}}\\quad}') % (directive)) + ('{Access this information in pyGSTi via')) + (('%s}') % (directive)) else: def tooltiptex(directive): return '' |  | if tips: def tooltiptex(directive): return ((('\\pdftooltip{{\\color{blue}\\texttt{%s}}\\quad}') % (directive)) + ('{Access this information in pyGSTi via')) + (('%s}') % (directive)) else: def tooltiptex(directive): return ''
default_dir = self.parameters['defaultDirectory'] |  | default_dir = self.parameters['defaultDirectory']
default_base = self.parameters['defaultBasename'] |  | default_base = self.parameters['defaultBasename']
if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] \ + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) \ else "GSTReport" report_base += suffix |  | if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) else "GSTBrief" report_base += suffix
if datasetLabel == 'auto': if default_base is not None: datasetLabel = _latex.latex_escaped(default_base) else: datasetLabel = '$\\mathcal{D}$' |  | if datasetLabel == 'auto': if default_base is not None: datasetLabel = _latex.latex_escaped(default_base) else: datasetLabel = '$\\mathcal{D}$'
if title == 'auto': title = ('GST report for %s') % (datasetLabel) |  | if title == 'auto': title = ('Brief GST report for %s') % (datasetLabel)

Clone # 9
Distance between two fragments = 2
Clone size = 23

Source file "report/results.py" The first line is 1498 |  | Source file "report/results.py" The first line is 1974
if tips: def tooltiptex(directive): return ((('\\pdftooltip{{\\color{blue}\\texttt{%s}}\\quad}') % (directive)) + ('{Access this information in pyGSTi via')) + (('%s}') % (directive)) else: def tooltiptex(directive): return '' |  | if tips: def tooltiptex(directive): return ((('\\pdftooltip{{\\color{blue}\\texttt{%s}}\\quad}') % (directive)) + ('{Access this information in pyGSTi via')) + (('%s}') % (directive)) else: def tooltiptex(directive): return ''
default_dir = self.parameters['defaultDirectory'] |  | default_dir = self.parameters['defaultDirectory']
default_base = self.parameters['defaultBasename'] |  | default_base = self.parameters['defaultBasename']
if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] \ + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) \ else "GSTReport" report_base += suffix |  | if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) else "GSTBrief" report_base += suffix
if datasetLabel == 'auto': if default_base is not None: datasetLabel = _latex.latex_escaped(default_base) else: datasetLabel = '$\\mathcal{D}$' |  | if datasetLabel == 'auto': if default_base is not None: datasetLabel = _latex.latex_escaped(default_base) else: datasetLabel = '$\\mathcal{D}$'
if title == 'auto': title = ('GST report for %s') % (datasetLabel) |  | if title == 'auto': title = ('Brief GST report for %s') % (datasetLabel)

Clone # 10
Distance between two fragments = 1
Clone size = 20

Source file "report/results.py" The first line is 3729 |  | Source file "report/results.py" The first line is 2141
if bWasInteractive: _matplotlib.pyplot.ion() |  | if bWasInteractive: _matplotlib.pyplot.ion()
printer.log('*** Merging into template file ***') |  | printer.log('*** Merging into template file ***')
mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex')) |  | mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex'))
appendicesTexFilename = _os.path.join(report_dir, (report_base) + ('_appendices.tex')) |  | appendicesTexFilename = _os.path.join(report_dir, (report_base) + ('_appendices.tex'))
pdfFilename = _os.path.join(report_dir, (report_base) + ('.pdf')) |  | pdfFilename = _os.path.join(report_dir, (report_base) + ('.pdf'))
mainTemplate = 'report_general_main.tex' |  | mainTemplate = 'brief_report_main.tex'
self._merge_template(qtys, mainTemplate, mainTexFilename) |  | self._merge_template(qtys, mainTemplate, mainTexFilename)
printer.log('Latex file(s) successfully generated. Attempting to compile with pdflatex...') |  | printer.log('Latex file(s) successfully generated. Attempting to compile with pdflatex...')
cwd = _os.getcwd() |  | cwd = _os.getcwd()
if len(report_dir) > 0: _os.chdir(report_dir) |  | if len(report_dir) > 0: _os.chdir(report_dir)
try: try: self._compile_latex_report(report_dir, report_base, self.options.latex_call, printer) except _subprocess.CalledProcessError, e: printer.error((('pdflatex returned code %d ') % (e.returncode)) + (('Check %s.log to see details.') % (report_base))) finally: _os.chdir(cwd) |  | try: try: self._compile_latex_report(report_dir, report_base, self.options.latex_call, printer) except _subprocess.CalledProcessError, e: printer.error((('pdflatex returned code %d ') % (e.returncode)) + (('Check %s.log to see details.') % (report_base))) finally: _os.chdir(cwd)
return None |  | return None

Clone # 11
Distance between two fragments = 0
Clone size = 22

Source file "report/results.py" The first line is 2040 |  | Source file "report/results.py" The first line is 3351
if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET' |  | if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET'
pdfInfo = [('Author', 'pyGSTi'), ('Title', title), ('Keywords', 'GST'), ('pyGSTi Version', _version.__version__), ('opt_long_tables', self.options.long_tables), ('opt_table_class', self.options.table_class), ('opt_template_path', self.options.template_path), ('opt_latex_cmd', self.options.latex_cmd)] |  | pdfInfo = [('Author', 'pyGSTi'), ('Title', title), ('Keywords', 'GST'), ('pyGSTi Version', _version.__version__), ('opt_long_tables', self.options.long_tables), ('opt_table_class', self.options.table_class), ('opt_template_path', self.options.template_path), ('opt_latex_cmd', self.options.latex_cmd)]
for key in sorted(list(self.parameters.keys())): pdfInfo.append((key, self.parameters[key])) |  | for key in sorted(list(self.parameters.keys())): pdfInfo.append((key, self.parameters[key]))
qtys['pdfinfo'] = _to_pdfinfo(pdfInfo) |  | qtys['pdfinfo'] = _to_pdfinfo(pdfInfo)
D = (report_base) + ('_files') |  | D = (report_base) + ('_files')
if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D)) |  | if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D))
printer.log('*** Generating tables ***') |  | printer.log('*** Generating tables ***')

Clone # 12
Distance between two fragments = 0
Clone size = 22

Source file "report/results.py" The first line is 2040 |  | Source file "report/results.py" The first line is 1573
if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET' |  | if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET'
pdfInfo = [('Author', 'pyGSTi'), ('Title', title), ('Keywords', 'GST'), ('pyGSTi Version', _version.__version__), ('opt_long_tables', self.options.long_tables), ('opt_table_class', self.options.table_class), ('opt_template_path', self.options.template_path), ('opt_latex_cmd', self.options.latex_cmd)] |  | pdfInfo = [('Author', 'pyGSTi'), ('Title', title), ('Keywords', 'GST'), ('pyGSTi Version', _version.__version__), ('opt_long_tables', self.options.long_tables), ('opt_table_class', self.options.table_class), ('opt_template_path', self.options.template_path), ('opt_latex_cmd', self.options.latex_cmd)]
for key in sorted(list(self.parameters.keys())): pdfInfo.append((key, self.parameters[key])) |  | for key in sorted(list(self.parameters.keys())): pdfInfo.append((key, self.parameters[key]))
qtys['pdfinfo'] = _to_pdfinfo(pdfInfo) |  | qtys['pdfinfo'] = _to_pdfinfo(pdfInfo)
D = (report_base) + ('_files') |  | D = (report_base) + ('_files')
if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D)) |  | if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D))
printer.log('*** Generating tables ***') |  | printer.log('*** Generating tables ***')

Clone # 13
Distance between two fragments = 0
Clone size = 22

Source file "report/results.py" The first line is 3351 |  | Source file "report/results.py" The first line is 2314
if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET' |  | if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET'
pdfInfo = [('Author', 'pyGSTi'), ('Title', title), ('Keywords', 'GST'), ('pyGSTi Version', _version.__version__), ('opt_long_tables', self.options.long_tables), ('opt_table_class', self.options.table_class), ('opt_template_path', self.options.template_path), ('opt_latex_cmd', self.options.latex_cmd)] |  | pdfInfo = [('Author', 'pyGSTi'), ('Title', title), ('Keywords', 'GST'), ('pyGSTi Version', _version.__version__), ('opt_long_tables', self.options.long_tables), ('opt_table_class', self.options.table_class), ('opt_template_path', self.options.template_path), ('opt_latex_cmd', self.options.latex_cmd)]
for key in sorted(list(self.parameters.keys())): pdfInfo.append((key, self.parameters[key])) |  | for key in sorted(list(self.parameters.keys())): pdfInfo.append((key, self.parameters[key]))
qtys['pdfinfo'] = _to_pdfinfo(pdfInfo) |  | qtys['pdfinfo'] = _to_pdfinfo(pdfInfo)
D = (report_base) + ('_files') |  | D = (report_base) + ('_files')
if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D)) |  | if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D))
printer.log('*** Generating tables ***') |  | printer.log('*** Generating tables ***')

Clone # 14
Distance between two fragments = 0
Clone size = 22

Source file "report/results.py" The first line is 1573 |  | Source file "report/results.py" The first line is 2314
if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET' |  | if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET'
pdfInfo = [('Author', 'pyGSTi'), ('Title', title), ('Keywords', 'GST'), ('pyGSTi Version', _version.__version__), ('opt_long_tables', self.options.long_tables), ('opt_table_class', self.options.table_class), ('opt_template_path', self.options.template_path), ('opt_latex_cmd', self.options.latex_cmd)] |  | pdfInfo = [('Author', 'pyGSTi'), ('Title', title), ('Keywords', 'GST'), ('pyGSTi Version', _version.__version__), ('opt_long_tables', self.options.long_tables), ('opt_table_class', self.options.table_class), ('opt_template_path', self.options.template_path), ('opt_latex_cmd', self.options.latex_cmd)]
for key in sorted(list(self.parameters.keys())): pdfInfo.append((key, self.parameters[key])) |  | for key in sorted(list(self.parameters.keys())): pdfInfo.append((key, self.parameters[key]))
qtys['pdfinfo'] = _to_pdfinfo(pdfInfo) |  | qtys['pdfinfo'] = _to_pdfinfo(pdfInfo)
D = (report_base) + ('_files') |  | D = (report_base) + ('_files')
if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D)) |  | if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D))
printer.log('*** Generating tables ***') |  | printer.log('*** Generating tables ***')

Clone # 15
Distance between two fragments = 1
Clone size = 19

Source file "report/ppt.py" The first line is 211 |  | Source file "report/html.py" The first line is 233
if isinstance(el, basestring): return el |  | if isinstance(el, basestring): return el
if type(el) in (int, _np.int64): return ('%d') % (el) |  | if type(el) in (int, _np.int64): return ('%d') % (el)
if (el is None) or (_np.isnan(el)): return '--' |  | if (el is None) or (_np.isnan(el)): return '--'
try: if abs(el.real) > TOL: if abs(el.imag) > TOL: if complexAsPolar: r,phi = cmath.polar(el) ex = ("i%.1f" % phi) if phi >= 0 else ("-i%.1f" % -phi) s = "%se^{%s}" % (render(r),ex) else: s = "%s%s%si" % (render(el.real),'+' if el.imag > 0 else '-', render(abs(el.imag))) else: s = "%s" % render(el.real) else: if abs(el.imag) > TOL: s = "%si" % render(el.imag) else: s = "0" except: #try: # if abs(el) > TOL: #thows exception if el is not a number # s = "%s" % render(el.real) # else: # s = "0" #except: s = str(el) |  | try: if abs(el.real) > TOL: if abs(el.imag) > TOL: if complexAsPolar: r,phi = cmath.polar(el) ex = ("i%.1f" % phi) if phi >= 0 else ("-i%.1f" % -phi) s = "%se<sup>%s</sup>" % (render(r),ex) else: s = "%s%s%si" % (render(el.real),'+' if el.imag > 0 else '-', render(abs(el.imag))) else: s = "%s" % render(el.real) else: if abs(el.imag) > TOL: s = "%si" % render(el.imag) else: s = "0" except: #try: # if abs(el) > TOL: #throw exception if el is not a number # s = "%s" % render(el.real) # else: # s = "0" #except: s = str(el)
return s |  | return s

Clone # 16
Distance between two fragments = 0
Clone size = 18

Source file "report/results.py" The first line is 2338 |  | Source file "report/results.py" The first line is 2745
D = (report_base) + ('_files') |  | D = (report_base) + ('_files')
if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D)) |  | if not _os.path.isdir(_os.path.join(report_dir, D)): _os.mkdir(_os.path.join(report_dir, D))
printer.log('*** Generating tables ***') |  | printer.log('*** Generating tables ***')
std_tables = ('targetSpamTable', 'targetGatesTable', 'datasetOverviewTable', 'bestGatesetSpamTable', 'bestGatesetSpamParametersTable', 'bestGatesetGatesTable', 'bestGatesetChoiTable', 'bestGatesetDecompTable', 'bestGatesetRotnAxisTable', 'bestGatesetVsTargetTable', 'bestGatesetErrorGenTable') |  | std_tables = ('targetSpamTable', 'targetGatesTable', 'datasetOverviewTable', 'bestGatesetSpamTable', 'bestGatesetSpamParametersTable', 'bestGatesetGatesTable', 'bestGatesetChoiTable', 'bestGatesetDecompTable', 'bestGatesetRotnAxisTable', 'bestGatesetVsTargetTable', 'bestGatesetErrorGenTable')
ls_and_germs_tables = ('fiducialListTable', 'prepStrListTable', 'effectStrListTable', 'germListTable', 'progressTable') |  | ls_and_germs_tables = ('fiducialListTable', 'prepStrListTable', 'effectStrListTable', 'germListTable', 'progressTable')
tables_to_compute = std_tables |  | tables_to_compute = std_tables
tables_to_blank = [] |  | tables_to_blank = []
if self._LsAndGermInfoSet: tables_to_compute += ls_and_germs_tables else: tables_to_blank += ls_and_germs_tables |  | if self._LsAndGermInfoSet: tables_to_compute += ls_and_germs_tables else: tables_to_blank += ls_and_germs_tables

Clone # 17
Distance between two fragments = 0
Clone size = 17

Source file "report/results.py" The first line is 3442 |  | Source file "report/results.py" The first line is 1665
printer.log('*** Generating plots ***') |  | printer.log('*** Generating plots ***')
if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False |  | if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False
maxW, maxH = (6.5, 9.0) |  | maxW, maxH = (6.5, 9.0)
def incgr(figFilenm, W=None, H=None): if W is None: W = maxW if H is None: H = maxH return (('\\includegraphics[width=%.2fin,height=%.2fin') % ((W, H))) + ((',keepaspectratio]{%s/%s}') % ((D, figFilenm))) |  | def incgr(figFilenm, W=None, H=None): if W is None: W = maxW if H is None: H = maxH return (('\\includegraphics[width=%.2fin,height=%.2fin') % ((W, H))) + ((',keepaspectratio]{%s/%s}') % ((D, figFilenm)))
def set_fig_qtys(figkey, figFilenm, v, W=None, H=None): fig = self.figures.get(figkey, verbosity=v) fig.save_to(_os.path.join(report_dir, D, figFilenm)) qtys[figkey] = incgr(figFilenm, W, H) qtys[('tt_') + (figkey)] = tooltiptex((".figures['%s']") % (figkey)) return fig |  | def set_fig_qtys(figkey, figFilenm, v, W=None, H=None): fig = self.figures.get(figkey, verbosity=v) fig.save_to(_os.path.join(report_dir, D, figFilenm)) qtys[figkey] = incgr(figFilenm, W, H) qtys[('tt_') + (figkey)] = tooltiptex((".figures['%s']") % (figkey)) return fig

Clone # 18
Distance between two fragments = 4
Clone size = 17

Source file "report/results.py" The first line is 2289 |  | Source file "report/results.py" The first line is 1548
if not self._LsAndGermInfoSet: debugAidsAppendix = False pixelPlotAppendix = False whackamoleAppendix = False |  | if not self._LsAndGermInfoSet: debugAidsAppendix = False pixelPlotAppendix = False whackamoleAppendix = False
qtys = {} |  | qtys = {}
qtys['title'] = title |  | qtys['title'] = title
qtys['datasetLabel'] = datasetLabel |  | qtys['datasetLabel'] = datasetLabel
qtys['settoggles'] = "\\toggle%s{confidences}\n" % \ ("false" if confidenceLevel is None else "true" ) |  | qtys['settoggles'] = "\\toggle%s{confidences}\n" % \ ("false" if confidenceLevel is None else "true")
qtys['settoggles'] += "\\toggle%s{LsAndGermsSet}\n" % \ ("true" if self._LsAndGermInfoSet else "false" ) |  | qtys['settoggles'] += "\\toggle%s{LsAndGermsSet}\n" % \ ("true" if self._LsAndGermInfoSet else "false")
qtys['settoggles'] += "\\toggle%s{debuggingaidsappendix}\n" % \ ("true" if debugAidsAppendix else "false" ) |  | qtys['settoggles'] += "\\toggle%s{debuggingaidsappendix}\n" % \ ("true" if debugAidsAppendix else "false")
qtys['settoggles'] += "\\toggle%s{pixelplotsappendix}\n" % \ ("true" if pixelPlotAppendix else "false" ) |  | qtys['settoggles'] += "\\toggle%s{gaugeoptappendix}\n" % \ ("true" if gaugeOptAppendix else "false")
qtys['settoggles'] += "\\toggle%s{whackamoleappendix}\n" % \ ("true" if whackamoleAppendix else "false" ) |  | qtys['settoggles'] += "\\toggle%s{pixelplotsappendix}\n" % \ ("true" if pixelPlotAppendix else "false")

Clone # 19
Distance between two fragments = 3
Clone size = 16

Source file "report/results.py" The first line is 3737 |  | Source file "report/results.py" The first line is 2558
appendicesTexFilename = _os.path.join(report_dir, (report_base) + ('_appendices.tex')) |  | mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex'))
pdfFilename = _os.path.join(report_dir, (report_base) + ('.pdf')) |  | pdfFilename = _os.path.join(report_dir, (report_base) + ('.pdf'))
mainTemplate = 'report_general_main.tex' |  | mainTemplate = 'slides_main.tex'
self._merge_template(qtys, mainTemplate, mainTexFilename) |  | self._merge_template(qtys, mainTemplate, mainTexFilename)
printer.log('Latex file(s) successfully generated. Attempting to compile with pdflatex...') |  | printer.log('Latex file(s) successfully generated. Attempting to compile with pdflatex...')
cwd = _os.getcwd() |  | cwd = _os.getcwd()
if len(report_dir) > 0: _os.chdir(report_dir) |  | if len(report_dir) > 0: _os.chdir(report_dir)
try: try: self._compile_latex_report(report_dir, report_base, self.options.latex_call, printer) except _subprocess.CalledProcessError, e: printer.error((('pdflatex returned code %d ') % (e.returncode)) + (('Check %s.log to see details.') % (report_base))) finally: _os.chdir(cwd) |  | try: try: self._compile_latex_report(report_dir, report_base, self.options.latex_call, printer) except _subprocess.CalledProcessError, e: printer.error((('pdflatex returned code %d ') % (e.returncode)) + (('Check %s.log to see details.') % (report_base))) finally: _os.chdir(cwd)
return None |  | return None

Clone # 20
Distance between two fragments = 3
Clone size = 16

Source file "report/results.py" The first line is 2558 |  | Source file "report/results.py" The first line is 2148
mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex')) |  | appendicesTexFilename = _os.path.join(report_dir, (report_base) + ('_appendices.tex'))
pdfFilename = _os.path.join(report_dir, (report_base) + ('.pdf')) |  | pdfFilename = _os.path.join(report_dir, (report_base) + ('.pdf'))
mainTemplate = 'slides_main.tex' |  | mainTemplate = 'brief_report_main.tex'
self._merge_template(qtys, mainTemplate, mainTexFilename) |  | self._merge_template(qtys, mainTemplate, mainTexFilename)
printer.log('Latex file(s) successfully generated. Attempting to compile with pdflatex...') |  | printer.log('Latex file(s) successfully generated. Attempting to compile with pdflatex...')
cwd = _os.getcwd() |  | cwd = _os.getcwd()
if len(report_dir) > 0: _os.chdir(report_dir) |  | if len(report_dir) > 0: _os.chdir(report_dir)
try: try: self._compile_latex_report(report_dir, report_base, self.options.latex_call, printer) except _subprocess.CalledProcessError, e: printer.error((('pdflatex returned code %d ') % (e.returncode)) + (('Check %s.log to see details.') % (report_base))) finally: _os.chdir(cwd) |  | try: try: self._compile_latex_report(report_dir, report_base, self.options.latex_call, printer) except _subprocess.CalledProcessError, e: printer.error((('pdflatex returned code %d ') % (e.returncode)) + (('Check %s.log to see details.') % (report_base))) finally: _os.chdir(cwd)
return None |  | return None

Clone # 21
Distance between two fragments = 2
Clone size = 17

Source file "report/results.py" The first line is 3289 |  | Source file "report/results.py" The first line is 2258
default_dir = self.parameters['defaultDirectory'] |  | default_dir = self.parameters['defaultDirectory']
default_base = self.parameters['defaultBasename'] |  | default_base = self.parameters['defaultBasename']
if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] \ + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) \ else "GSTReport" report_base += suffix |  | if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) else "GSTSlides" report_base += suffix
if datasetLabel == 'auto': if default_base is not None: datasetLabel = _latex.latex_escaped(default_base) else: datasetLabel = '$\\mathcal{D}$' |  | if datasetLabel == 'auto': if default_base is not None: datasetLabel = _latex.latex_escaped(default_base) else: datasetLabel = '$\\mathcal{D}$'
if title == 'auto': title = ('GST report for %s') % (datasetLabel) |  | if title == 'auto': title = ('GST on %s') % (datasetLabel)
best_gs = self.gatesets['final estimate'] |  | best_gs = self.gatesets['final estimate']

Clone # 22
Distance between two fragments = 4
Clone size = 15

Source file "report/results.py" The first line is 2525 |  | Source file "report/results.py" The first line is 2505
with printer.progress_logging(1): for i,germ in enumerate(len1Germs): # printer.log("%d " % (len(len1Germs)+i+1), end='') printer.show_progress(i, len(len1Germs) - 1, prefix='', end='') fig = self.figures.get("whack%sMoleBoxesSummed" % germ[0], verbosity=printer - 1) fig.save_to(_os.path.join(report_dir, D,"whack%sMoleBoxesSummed.pdf" % germ[0])) whackamoleplots += "\n" whackamoleplots += "\\begin{frame}\n" whackamoleplots += "\\frametitle{Summed whack-a-%s-mole plot for $\mathrm{%s}^{%d}$}" % (plotFnLatex,germ[0],highestL) whackamoleplots += "\\begin{figure}\n" whackamoleplots += "\\begin{center}\n" #whackamoleplots += "\\adjustbox{max height=\\dimexpr\\textheight-5.5cm\\relax, max width=\\textwidth}{" whackamoleplots += "\\includegraphics[width=%.2fin,height=%.2fin,keepaspectratio]{%s/whack%sMoleBoxesSummed.pdf}\n" % (maxW,maxH,D,germ[0]) #FUTURE: add caption and conditional tooltip? whackamoleplots += "\\end{center}\n" whackamoleplots += "\\end{figure}\n" whackamoleplots += "\\end{frame}\n" |  | with printer.progress_logging(1): for i,germ in enumerate(len1Germs): printer.show_progress(i, len(len1Germs) - 1, prefix='', end='') fig = self.figures.get("whack%sMoleBoxes" % germ[0],verbosity=printer - 1) fig.save_to(_os.path.join(report_dir, D,"whack%sMoleBoxes.pdf" % germ[0])) whackamoleplots += "\n" whackamoleplots += "\\begin{frame}\n" whackamoleplots += "\\frametitle{Whack-a-%s-mole plot for $\mathrm{%s}^{%d}$}" % (plotFnLatex,germ[0],highestL) whackamoleplots += "\\begin{figure}\n" whackamoleplots += "\\begin{center}\n" #whackamoleplots += "\\adjustbox{max height=\\dimexpr\\textheight-5.5cm\\relax, max width=\\textwidth}{" whackamoleplots += "\\includegraphics[width=%.2fin,height=%.2fin,keepaspectratio]{%s/whack%sMoleBoxes.pdf}\n" % (maxW,maxH,D,germ[0]) #FUTURE: add caption and conditional tooltip? whackamoleplots += "\\end{center}\n" whackamoleplots += "\\end{figure}\n" whackamoleplots += "\\end{frame}\n"

Clone # 23
Distance between two fragments = 0
Clone size = 15

Source file "report/results.py" The first line is 2085 |  | Source file "report/results.py" The first line is 2364
for key in tables_to_compute: qtys[key] = self.tables.get(key, verbosity=(printer) - (1)).render('latex', longtables=self.options.long_tables, scratchDir=D, precision=self.options.precision, polarprecision=self.options.polar_precision) qtys[('tt_') + (key)] = tooltiptex((".tables['%s']") % (key)) |  | for key in tables_to_compute: qtys[key] = self.tables.get(key, verbosity=(printer) - (1)).render('latex', longtables=self.options.long_tables, scratchDir=D, precision=self.options.precision, polarprecision=self.options.polar_precision) qtys[('tt_') + (key)] = tooltiptex((".tables['%s']") % (key))
for key in tables_to_blank: qtys[key] = _generation.get_blank_table().render('latex', longtables=self.options.long_tables) qtys[('tt_') + (key)] = '' |  | for key in tables_to_blank: qtys[key] = _generation.get_blank_table().render('latex', longtables=self.options.long_tables) qtys[('tt_') + (key)] = ''
printer.log('*** Generating plots ***') |  | printer.log('*** Generating plots ***')
if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False |  | if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False

Clone # 24
Distance between two fragments = 2
Clone size = 15

Source file "report/plotting.py" The first line is 508 |  | Source file "report/plotting.py" The first line is 529
input_values = _np.linspace(0.0, 1.0, N) |  | input_values = _np.linspace(0.0, 1.0, N)
scaled_values = _np.linspace(low_val, high_val, N) |  | scaled_values = _np.linspace(low_val, high_val, N)
colors = cmap(input_values) |  | colors = cmap(input_values)
prev_r, prev_g, prev_b, prev_a = prev_cmap(1.0) |  | prev_r, prev_g, prev_b, prev_a = prev_cmap(1.0)
r, g, b, a = colors[0] |  | r, g, b, a = colors[0]
red_list.append((low_val, prev_r, r)) |  | red_list.append((low_val, prev_r, r))
green_list.append((low_val, prev_g, g)) |  | green_list.append((low_val, prev_g, g))
blue_list.append((low_val, prev_b, b)) |  | blue_list.append((low_val, prev_b, b))
alpha_list.append((low_val, prev_a, a)) |  | alpha_list.append((low_val, prev_a, a))
for color, value in zip(colors[1:-1], scaled_values[1:-1]): r, g, b, a = color red_list.append((value, r, r)) green_list.append((value, g, g)) blue_list.append((value, b, b)) alpha_list.append((value, a, a)) |  | for color, value in zip(colors[1:], scaled_values[1:]): r, g, b, a = color red_list.append((value, r, r)) green_list.append((value, g, g)) blue_list.append((value, b, b)) alpha_list.append((value, a, a))

Clone # 25
Distance between two fragments = 2
Clone size = 16

Source file "report/results.py" The first line is 2258 |  | Source file "report/results.py" The first line is 1511
default_dir = self.parameters['defaultDirectory'] |  | default_dir = self.parameters['defaultDirectory']
default_base = self.parameters['defaultBasename'] |  | default_base = self.parameters['defaultBasename']
if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) else "GSTSlides" report_base += suffix |  | if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] \ + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) \ else "GSTReport" report_base += suffix
if datasetLabel == 'auto': if default_base is not None: datasetLabel = _latex.latex_escaped(default_base) else: datasetLabel = '$\\mathcal{D}$' |  | if datasetLabel == 'auto': if default_base is not None: datasetLabel = _latex.latex_escaped(default_base) else: datasetLabel = '$\\mathcal{D}$'
if title == 'auto': title = ('GST on %s') % (datasetLabel) |  | if title == 'auto': title = ('GST report for %s') % (datasetLabel)

Clone # 26
Distance between two fragments = 2
Clone size = 14

Source file "report/results.py" The first line is 2258 |  | Source file "report/results.py" The first line is 1985
default_dir = self.parameters['defaultDirectory'] |  | default_dir = self.parameters['defaultDirectory']
default_base = self.parameters['defaultBasename'] |  | default_base = self.parameters['defaultBasename']
if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) else "GSTSlides" report_base += suffix |  | if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) else "GSTBrief" report_base += suffix
if datasetLabel == 'auto': if default_base is not None: datasetLabel = _latex.latex_escaped(default_base) else: datasetLabel = '$\\mathcal{D}$' |  | if datasetLabel == 'auto': if default_base is not None: datasetLabel = _latex.latex_escaped(default_base) else: datasetLabel = '$\\mathcal{D}$'
if title == 'auto': title = ('GST on %s') % (datasetLabel) |  | if title == 'auto': title = ('Brief GST report for %s') % (datasetLabel)

Clone # 27
Distance between two fragments = 1
Clone size = 14

Source file "report/plotting.py" The first line is 3069 |  | Source file "report/plotting.py" The first line is 2889
prepStrs, effectStrs = strs |  | prepStrs, effectStrs = strs
spamLabels = gateset.get_spam_labels() |  | spamLabels = gateset.get_spam_labels()
spam_lbl_rows = { sl:i for (i,sl) in enumerate(spamLabels) } |  | spam_lbl_rows = { sl:i for (i,sl) in enumerate(spamLabels) }
vec_gs_len = gateset.num_params() |  | vec_gs_len = gateset.num_params()
N = _np.empty(len(allGatestringsUsedInLogLOpt)) |  | N = _np.empty(len(allGatestringsUsedInChi2Opt))
f = _np.empty((len(spamLabels), len(allGatestringsUsedInLogLOpt))) |  | f = _np.empty((len(spamLabels), len(allGatestringsUsedInChi2Opt)))
probs = _np.empty((len(spamLabels), len(allGatestringsUsedInLogLOpt))) |  | probs = _np.empty((len(spamLabels), len(allGatestringsUsedInChi2Opt)))
dprobs = _np.empty((len(spamLabels), len(allGatestringsUsedInLogLOpt), vec_gs_len)) |  | dprobs = _np.empty((len(spamLabels), len(allGatestringsUsedInChi2Opt), vec_gs_len))
for i, gateStr in enumerate(allGatestringsUsedInLogLOpt): N[i] = float(dataset[gateStr].total()) for k, sl in enumerate(spamLabels): f[k,i] = dataset[gateStr].fraction(sl) |  | for i, gateStr in enumerate(allGatestringsUsedInChi2Opt): N[i] = float(dataset[gateStr].total()) for k, sl in enumerate(spamLabels): f[k,i] = dataset[gateStr].fraction(sl)
evTree = gateset.bulk_evaltree(allGatestringsUsedInLogLOpt) |  | evTree = gateset.bulk_evaltree(allGatestringsUsedInChi2Opt)
gateset.bulk_fill_dprobs(dprobs, spam_lbl_rows, evTree, prMxToFill=probs) |  | gateset.bulk_fill_dprobs(dprobs, spam_lbl_rows, evTree, prMxToFill=probs)

Clone # 28
Distance between two fragments = 3
Clone size = 13

Source file "report/plotting.py" The first line is 2247 |  | Source file "report/plotting.py" The first line is 2408
def direct_chi2_boxplot(xvals, yvals, xy_gatestring_dict, dataset, directGatesets, strs, xlabel='', ylabel='', scale=1.0, prec='compact', title='Direct $\\chi^2$', sumUp=False, boxLabels=True, histogram=False, histBins=50, minProbClipForWeighting=0.0001, save_to=None, ticSize=20, invert=False, fidPairs=None, linlg_pcntle=0.05): prepStrs, effectStrs = strs def mx_fn(gateStr): return direct_chi2_matrix(gateStr, dataset, directGatesets.get(gateStr, None), strs, minProbClipForWeighting, fidPairs) xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp) stdcmap = StdColormapFactory('linlog', n_boxes=n_boxes, linlg_pcntle=linlg_pcntle, dof=dof) return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$') |  | def direct_logl_boxplot(xvals, yvals, xy_gatestring_dict, dataset, directGatesets, strs, xlabel='', ylabel='', scale=1.0, prec='compact', title='Direct $\\log(\\mathcal{L})$', sumUp=False, boxLabels=True, histogram=False, histBins=50, minProbClipForWeighting=0.0001, save_to=None, ticSize=20, invert=False, fidPairs=None, linlg_pcntle=0.05): prepStrs, effectStrs = strs def mx_fn(gateStr): return direct_logl_matrix(gateStr, dataset, directGatesets.get(gateStr, None), strs, minProbClipForWeighting, fidPairs) xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp) stdcmap = StdColormapFactory('linlog', n_boxes=n_boxes, linlg_pcntle=linlg_pcntle, dof=dof) return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$')

Clone # 29
Distance between two fragments = 0
Clone size = 13

Source file "report/results.py" The first line is 2307 |  | Source file "report/results.py" The first line is 2727
qtys['confidenceLevel'] = "%g" % confidenceLevel \ if confidenceLevel is not None else "NOT-SET" |  | qtys['confidenceLevel'] = "%g" % confidenceLevel \ if confidenceLevel is not None else "NOT-SET"
qtys['objective'] = "$\\log{\\mathcal{L}}$" \ if self.parameters['objective'] == "logl" else "$\\chi^2$" |  | qtys['objective'] = "$\\log{\\mathcal{L}}$" \ if self.parameters['objective'] == "logl" else "$\\chi^2$"
qtys['gofObjective'] = "$2\\Delta\\log{\\mathcal{L}}$" \ if self.parameters['objective'] == "logl" else "$\\chi^2$" |  | qtys['gofObjective'] = "$2\\Delta\\log{\\mathcal{L}}$" \ if self.parameters['objective'] == "logl" else "$\\chi^2$"
if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET' |  | if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET'

Clone # 30
Distance between two fragments = 0
Clone size = 13

Source file "report/results.py" The first line is 3758 |  | Source file "report/results.py" The first line is 1886
self._merge_template(qtys, mainTemplate, mainTexFilename) |  | self._merge_template(qtys, mainTemplate, mainTexFilename)
printer.log('Latex file(s) successfully generated. Attempting to compile with pdflatex...') |  | printer.log('Latex file(s) successfully generated. Attempting to compile with pdflatex...')
cwd = _os.getcwd() |  | cwd = _os.getcwd()
if len(report_dir) > 0: _os.chdir(report_dir) |  | if len(report_dir) > 0: _os.chdir(report_dir)
try: try: self._compile_latex_report(report_dir, report_base, self.options.latex_call, printer) except _subprocess.CalledProcessError, e: printer.error((('pdflatex returned code %d ') % (e.returncode)) + (('Check %s.log to see details.') % (report_base))) finally: _os.chdir(cwd) |  | try: try: self._compile_latex_report(report_dir, report_base, self.options.latex_call, printer) except _subprocess.CalledProcessError, e: printer.error((('pdflatex returned code %d ') % (e.returncode)) + (('Check %s.log to see details.') % (report_base))) finally: _os.chdir(cwd)
return None |  | return None

Clone # 31
Distance between two fragments = 0
Clone size = 13

Source file "report/results.py" The first line is 2562 |  | Source file "report/results.py" The first line is 1886
self._merge_template(qtys, mainTemplate, mainTexFilename) |  | self._merge_template(qtys, mainTemplate, mainTexFilename)
printer.log('Latex file(s) successfully generated. Attempting to compile with pdflatex...') |  | printer.log('Latex file(s) successfully generated. Attempting to compile with pdflatex...')
cwd = _os.getcwd() |  | cwd = _os.getcwd()
if len(report_dir) > 0: _os.chdir(report_dir) |  | if len(report_dir) > 0: _os.chdir(report_dir)
try: try: self._compile_latex_report(report_dir, report_base, self.options.latex_call, printer) except _subprocess.CalledProcessError, e: printer.error((('pdflatex returned code %d ') % (e.returncode)) + (('Check %s.log to see details.') % (report_base))) finally: _os.chdir(cwd) |  | try: try: self._compile_latex_report(report_dir, report_base, self.options.latex_call, printer) except _subprocess.CalledProcessError, e: printer.error((('pdflatex returned code %d ') % (e.returncode)) + (('Check %s.log to see details.') % (report_base))) finally: _os.chdir(cwd)
return None |  | return None

Clone # 32
Distance between two fragments = 0
Clone size = 13

Source file "report/results.py" The first line is 2152 |  | Source file "report/results.py" The first line is 1886
self._merge_template(qtys, mainTemplate, mainTexFilename) |  | self._merge_template(qtys, mainTemplate, mainTexFilename)
printer.log('Latex file(s) successfully generated. Attempting to compile with pdflatex...') |  | printer.log('Latex file(s) successfully generated. Attempting to compile with pdflatex...')
cwd = _os.getcwd() |  | cwd = _os.getcwd()
if len(report_dir) > 0: _os.chdir(report_dir) |  | if len(report_dir) > 0: _os.chdir(report_dir)
try: try: self._compile_latex_report(report_dir, report_base, self.options.latex_call, printer) except _subprocess.CalledProcessError, e: printer.error((('pdflatex returned code %d ') % (e.returncode)) + (('Check %s.log to see details.') % (report_base))) finally: _os.chdir(cwd) |  | try: try: self._compile_latex_report(report_dir, report_base, self.options.latex_call, printer) except _subprocess.CalledProcessError, e: printer.error((('pdflatex returned code %d ') % (e.returncode)) + (('Check %s.log to see details.') % (report_base))) finally: _os.chdir(cwd)
return None |  | return None

Clone # 33
Distance between two fragments = 4
Clone size = 13

Source file "report/results.py" The first line is 770 |  | Source file "report/results.py" The first line is 783
fns['blankSummedBoxPlot'] = (fn, validate_LsAndGerms) |  | fns['directLGSTColorBoxPlot'] = (fn, validate_LsAndGerms)
def fn(key, confidenceLevel, vb): noConfidenceLevelDependence(confidenceLevel) directPlotFn = getDirectPlotFn() mpc = getMPC() Ls, germs, _, fidPairs, _, _, baseStr_dict, strs, st = plot_setup() directLGST = self._specials.get('direct_lgst_gatesets', verbosity=vb) return directPlotFn(Ls[st:], germs, baseStr_dict, self.dataset, directLGST, strs, '$L$', 'germ', scale=1.0, sumUp=False, title='', minProbClipForWeighting=mpc, fidPairs=fidPairs, save_to='', ticSize=20, linlg_pcntle=(float(self.parameters['linlogPercentile'])) / (100)) |  | def fn(key, confidenceLevel, vb): noConfidenceLevelDependence(confidenceLevel) directPlotFn = getDirectPlotFn() mpc = getMPC() Ls, germs, _, fidPairs, _, _, baseStr_dict, strs, st = plot_setup() directLongSeqGST = self._specials.get('DirectLongSeqGatesets', verbosity=vb) return directPlotFn(Ls[st:], germs, baseStr_dict, self.dataset, directLongSeqGST, strs, '$L$', 'germ', scale=1.0, sumUp=False, title='', minProbClipForWeighting=mpc, fidPairs=fidPairs, save_to='', ticSize=20, linlg_pcntle=(float(self.parameters['linlogPercentile'])) / (100))
fns['directLGSTColorBoxPlot'] = (fn, validate_LsAndGerms) |  | fns['directLongSeqGSTColorBoxPlot'] = (fn, validate_LsAndGerms)

Clone # 34
Distance between two fragments = 1
Clone size = 12

Source file "report/generation.py" The first line is 477 |  | Source file "report/generation.py" The first line is 344
qtys_to_compute = [('%s %s') % ((gl, qty)) for qty in qtyNames for gl in gateLabels ] |  | qtys_to_compute = [('%s %s') % ((gl, qty)) for qty in qtyNames for gl in gateLabels ]
qtys = _cr.compute_gateset_gateset_qtys(qtys_to_compute, gateset, targetGateset, confidenceRegionInfo) |  | qtys = _cr.compute_gateset_gateset_qtys(qtys_to_compute, gateset, targetGateset, confidenceRegionInfo)
table = _ReportTable(colHeadings, formatters) |  | table = _ReportTable(colHeadings, formatters)
formatters = ([None]) + ((['PiErrorBars']) * (len(qtyNames))) |  | formatters = ([None]) + ((['ErrorBars']) * (len(qtyNames)))
for gl in gateLabels: if confidenceRegionInfo is None: rowData = ([gl]) + ([(qtys[('%s %s') % ((gl, qty))].get_value(), None) for qty in qtyNames ]) else: rowData = ([gl]) + ([qtys[('%s %s') % ((gl, qty))].get_value_and_err_bar() for qty in qtyNames ]) table.addrow(rowData, formatters) |  | for gl in gateLabels: if confidenceRegionInfo is None: rowData = ([gl]) + ([(qtys[('%s %s') % ((gl, qty))].get_value(), None) for qty in qtyNames ]) else: rowData = ([gl]) + ([qtys[('%s %s') % ((gl, qty))].get_value_and_err_bar() for qty in qtyNames ]) table.addrow(rowData, formatters)
table.finish() |  | table.finish()
return table |  | return table

Clone # 35
Distance between two fragments = 3
Clone size = 12

Source file "report/plotting.py" The first line is 1384 |  | Source file "report/plotting.py" The first line is 1279
def logl_boxplot(xvals, yvals, xy_gatestring_dict, dataset, gateset, strs, xlabel='', ylabel='', scale=1.0, prec='compact', title='$\\log(\\mathcal{L})$', linlg_pcntle=0.05, sumUp=False, boxLabels=True, histogram=False, histBins=50, minProbClipForWeighting=0.0001, save_to=None, ticSize=20, invert=False, fidPairs=None): prepStrs, effectStrs = strs def mx_fn(gateStr): return logl_matrix(gateStr, dataset, gateset, strs, minProbClipForWeighting, fidPairs) xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp) stdcmap = StdColormapFactory('linlog', n_boxes=n_boxes, linlg_pcntle=linlg_pcntle, dof=dof) return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$') |  | def chi2_boxplot(xvals, yvals, xy_gatestring_dict, dataset, gateset, strs, xlabel='', ylabel='', scale=1.0, prec='compact', title='$\\chi^2$', linlg_pcntle=0.05, sumUp=False, boxLabels=True, histogram=False, histBins=50, minProbClipForWeighting=0.0001, save_to=None, ticSize=20, invert=False, fidPairs=None): prepStrs, effectStrs = strs def mx_fn(gateStr): return chi2_matrix(gateStr, dataset, gateset, strs, minProbClipForWeighting, fidPairs) xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp) stdcmap = StdColormapFactory('linlog', n_boxes=n_boxes, linlg_pcntle=linlg_pcntle, dof=dof) return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$')

Clone # 36
Distance between two fragments = 3
Clone size = 13

Source file "report/plotting.py" The first line is 2016 |  | Source file "report/plotting.py" The first line is 1883
direct_lgst = gateset_with_lgst_gatestring_estimates([gateStringToEstimate], dataset, specs, targetGateset, True, None, None, [gateStringLabel], svdTruncateTo, verbosity) |  | direct_lgst = gateset_with_lgst_gatestring_estimates([gateStringToEstimate], dataset, specs, targetGateset, True, None, None, [gateStringLabel], svdTruncateTo, verbosity)
prepStrs, effectStrs = _construction.get_spam_strs(specs) |  | prepStrs, effectStrs = _construction.get_spam_strs(specs)
gatestrings = ((prepStrs) + (effectStrs)) + ([(prepStr) + (effectStr) for prepStr in prepStrs for effectStr in effectStrs ]) |  | gatestrings = ((prepStrs) + (effectStrs)) + ([(prepStr) + (effectStr) for prepStr in prepStrs for effectStr in effectStrs ])
for gateLabel in direct_lgst.gates: gatestrings.extend([((prepStr) + (_objs.GateString((gateLabel), bCheck=False))) + (effectStr) for prepStr in prepStrs for effectStr in effectStrs ]) |  | for gateLabel in direct_lgst.gates: gatestrings.extend([((prepStr) + (_objs.GateString((gateLabel), bCheck=False))) + (effectStr) for prepStr in prepStrs for effectStr in effectStrs ])
_, direct_mlegst = _alg.do_mlgst(dataset, direct_lgst, gatestrings, minProbClip=minProbClip, probClipInterval=probClipInterval, verbosity=verbosity, gateLabelAliases={gateStringLabel: gateStringToEstimate}) |  | _, direct_lsgst = _alg.do_mc2gst(dataset, direct_lgst, gatestrings, minProbClipForWeighting=minProbClipForWeighting, probClipInterval=probClipInterval, verbosity=verbosity, gateLabelAliases={gateStringLabel: gateStringToEstimate})
return direct_mlegst |  | return direct_lsgst

Clone # 37
Distance between two fragments = 3
Clone size = 11

Source file "report/generation.py" The first line is 174 |  | Source file "report/generation.py" The first line is 1210
gateLabels = list(gateset.gates.keys()) |  | gateLabels = list(gateset.gates.keys())
mxBasis = gateset.get_basis_name() |  | basisNm = gateset.get_basis_name()
mxBasisDim = gateset.get_basis_dimension() |  | basisDims = gateset.get_basis_dimension()
basisNm = _tools.basis_longname(mxBasis, mxBasisDim) |  | basisLongNm = _tools.basis_longname(basisNm, basisDims)
if confidenceRegionInfo is None: colHeadings = ('Gate', ('Superoperator (%s basis)') % (basisNm)) formatters = (None, None) else: colHeadings = ('Gate', ('Superoperator (%s basis)') % (basisNm), ('%g%% C.I. half-width') % (confidenceRegionInfo.level)) formatters = (None, None, 'Conversion') |  | if confidenceRegionInfo is None: colHeadings = ('Gate', ('Superoperator (%s basis)') % (basisLongNm)) formatters = (None, None) else: colHeadings = ('Gate', ('Superoperator (%s basis)') % (basisLongNm), ('%g%% C.I. half-width') % (confidenceRegionInfo.level)) formatters = (None, None, 'Conversion')
table = _ReportTable(colHeadings, formatters) |  | table = _ReportTable(colHeadings, formatters)

Clone # 38
Distance between two fragments = 0
Clone size = 11

Source file "report/results.py" The first line is 3451 |  | Source file "report/results.py" The first line is 2388
def incgr(figFilenm, W=None, H=None): if W is None: W = maxW if H is None: H = maxH return (('\\includegraphics[width=%.2fin,height=%.2fin') % ((W, H))) + ((',keepaspectratio]{%s/%s}') % ((D, figFilenm))) |  | def incgr(figFilenm, W=None, H=None): if W is None: W = maxW if H is None: H = maxH return (('\\includegraphics[width=%.2fin,height=%.2fin') % ((W, H))) + ((',keepaspectratio]{%s/%s}') % ((D, figFilenm)))
def set_fig_qtys(figkey, figFilenm, v, W=None, H=None): fig = self.figures.get(figkey, verbosity=v) fig.save_to(_os.path.join(report_dir, D, figFilenm)) qtys[figkey] = incgr(figFilenm, W, H) qtys[('tt_') + (figkey)] = tooltiptex((".figures['%s']") % (figkey)) return fig |  | def set_fig_qtys(figkey, figFilenm, v, W=None, H=None): fig = self.figures.get(figkey, verbosity=v) fig.save_to(_os.path.join(report_dir, D, figFilenm)) qtys[figkey] = incgr(figFilenm, W, H) qtys[('tt_') + (figkey)] = tooltiptex((".figures['%s']") % (figkey)) return fig

Clone # 39
Distance between two fragments = 0
Clone size = 11

Source file "report/results.py" The first line is 2388 |  | Source file "report/results.py" The first line is 1674
def incgr(figFilenm, W=None, H=None): if W is None: W = maxW if H is None: H = maxH return (('\\includegraphics[width=%.2fin,height=%.2fin') % ((W, H))) + ((',keepaspectratio]{%s/%s}') % ((D, figFilenm))) |  | def incgr(figFilenm, W=None, H=None): if W is None: W = maxW if H is None: H = maxH return (('\\includegraphics[width=%.2fin,height=%.2fin') % ((W, H))) + ((',keepaspectratio]{%s/%s}') % ((D, figFilenm)))
def set_fig_qtys(figkey, figFilenm, v, W=None, H=None): fig = self.figures.get(figkey, verbosity=v) fig.save_to(_os.path.join(report_dir, D, figFilenm)) qtys[figkey] = incgr(figFilenm, W, H) qtys[('tt_') + (figkey)] = tooltiptex((".figures['%s']") % (figkey)) return fig |  | def set_fig_qtys(figkey, figFilenm, v, W=None, H=None): fig = self.figures.get(figkey, verbosity=v) fig.save_to(_os.path.join(report_dir, D, figFilenm)) qtys[figkey] = incgr(figFilenm, W, H) qtys[('tt_') + (figkey)] = tooltiptex((".figures['%s']") % (figkey)) return fig

Clone # 40
Distance between two fragments = 0
Clone size = 11

Source file "report/results.py" The first line is 3326 |  | Source file "report/results.py" The first line is 2289
if not self._LsAndGermInfoSet: debugAidsAppendix = False pixelPlotAppendix = False whackamoleAppendix = False |  | if not self._LsAndGermInfoSet: debugAidsAppendix = False pixelPlotAppendix = False whackamoleAppendix = False
qtys = {} |  | qtys = {}
qtys['title'] = title |  | qtys['title'] = title
qtys['datasetLabel'] = datasetLabel |  | qtys['datasetLabel'] = datasetLabel
qtys['settoggles'] = "\\toggle%s{confidences}\n" % \ ("false" if confidenceLevel is None else "true") |  | qtys['settoggles'] = "\\toggle%s{confidences}\n" % \ ("false" if confidenceLevel is None else "true" )
qtys['settoggles'] += "\\toggle%s{LsAndGermsSet}\n" % \ ("true" if self._LsAndGermInfoSet else "false") |  | qtys['settoggles'] += "\\toggle%s{LsAndGermsSet}\n" % \ ("true" if self._LsAndGermInfoSet else "false" )

Clone # 41
Distance between two fragments = 0
Clone size = 11

Source file "report/results.py" The first line is 3326 |  | Source file "report/results.py" The first line is 1548
if not self._LsAndGermInfoSet: debugAidsAppendix = False pixelPlotAppendix = False whackamoleAppendix = False |  | if not self._LsAndGermInfoSet: debugAidsAppendix = False pixelPlotAppendix = False whackamoleAppendix = False
qtys = {} |  | qtys = {}
qtys['title'] = title |  | qtys['title'] = title
qtys['datasetLabel'] = datasetLabel |  | qtys['datasetLabel'] = datasetLabel
qtys['settoggles'] = "\\toggle%s{confidences}\n" % \ ("false" if confidenceLevel is None else "true") |  | qtys['settoggles'] = "\\toggle%s{confidences}\n" % \ ("false" if confidenceLevel is None else "true")
qtys['settoggles'] += "\\toggle%s{LsAndGermsSet}\n" % \ ("true" if self._LsAndGermInfoSet else "false") |  | qtys['settoggles'] += "\\toggle%s{LsAndGermsSet}\n" % \ ("true" if self._LsAndGermInfoSet else "false")

Clone # 42
Distance between two fragments = 4
Clone size = 11

Source file "report/results.py" The first line is 806 |  | Source file "report/results.py" The first line is 796
fns['directLGSTDeviationColorBoxPlot'] = (fn, validate_LsAndGerms) |  | fns['directLongSeqGSTColorBoxPlot'] = (fn, validate_LsAndGerms)
def fn(key, confidenceLevel, vb): noConfidenceLevelDependence(confidenceLevel) Ls, germs, gsBest, _, _, _, baseStr_dict, _, st = plot_setup() directLongSeqGST = self._specials.get('DirectLongSeqGatesets', verbosity=vb) return _plotting.direct_deviation_boxplot(Ls[st:], germs, baseStr_dict, self.dataset, gsBest, directLongSeqGST, '$L$', 'germ', scale=1.0, prec=-1, title='', save_to='', ticSize=20) |  | def fn(key, confidenceLevel, vb): noConfidenceLevelDependence(confidenceLevel) Ls, germs, gsBest, _, _, _, baseStr_dict, _, st = plot_setup() directLGST = self._specials.get('direct_lgst_gatesets', verbosity=vb) return _plotting.direct_deviation_boxplot(Ls[st:], germs, baseStr_dict, self.dataset, gsBest, directLGST, '$L$', 'germ', scale=1.0, prec=-1, title='', save_to='', ticSize=20)
fns['directLongSeqGSTDeviationColorBoxPlot'] = (fn, validate_LsAndGerms) |  | fns['directLGSTDeviationColorBoxPlot'] = (fn, validate_LsAndGerms)

Clone # 43
Distance between two fragments = 4
Clone size = 10

Source file "report/results.py" The first line is 482 |  | Source file "report/results.py" The first line is 488
fns['bestGatesetSpamBriefTable'] = (fn, validate_essential) |  | fns['bestGatesetSpamParametersTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_spam_parameters_table(gsBest, cri) |  | def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_gates_table(gsBest, cri)
fns['bestGatesetSpamParametersTable'] = (fn, validate_essential) |  | fns['bestGatesetGatesTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_gates_table(gsBest, cri) |  | def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_choi_table(gsBest, cri)

Clone # 44
Distance between two fragments = 4
Clone size = 10

Source file "report/results.py" The first line is 482 |  | Source file "report/results.py" The first line is 494
fns['bestGatesetSpamBriefTable'] = (fn, validate_essential) |  | fns['bestGatesetGatesTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_spam_parameters_table(gsBest, cri) |  | def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_choi_table(gsBest, cri)
fns['bestGatesetSpamParametersTable'] = (fn, validate_essential) |  | fns['bestGatesetChoiTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_gates_table(gsBest, cri) |  | def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_decomp_table(gsBest, cri)

Clone # 45
Distance between two fragments = 4
Clone size = 11

Source file "report/results.py" The first line is 530 |  | Source file "report/results.py" The first line is 524
fns['bestGatesetVsTargetTable'] = (fn, validate_essential) |  | fns['bestGatesetClosestUnitaryTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_spam_vs_target_table(gsBest, gsTgt, cri) |  | def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gates_vs_target_table(gsBest, gsTgt, cri)
fns['bestGatesetSpamVsTargetTable'] = (fn, validate_essential) |  | fns['bestGatesetVsTargetTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gates_vs_target_err_gen_table(gsBest, gsTgt, cri) |  | def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_spam_vs_target_table(gsBest, gsTgt, cri)

Clone # 46
Distance between two fragments = 4
Clone size = 12

Source file "report/results.py" The first line is 536 |  | Source file "report/results.py" The first line is 524
fns['bestGatesetSpamVsTargetTable'] = (fn, validate_essential) |  | fns['bestGatesetClosestUnitaryTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gates_vs_target_err_gen_table(gsBest, gsTgt, cri) |  | def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gates_vs_target_table(gsBest, gsTgt, cri)
fns['bestGatesetErrorGenTable'] = (fn, validate_essential) |  | fns['bestGatesetVsTargetTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gates_vs_target_angles_table(gsBest, gsTgt, cri) |  | def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_spam_vs_target_table(gsBest, gsTgt, cri)

Clone # 47
Distance between two fragments = 4
Clone size = 10

Source file "report/reportables.py" The first line is 470 |  | Source file "report/reportables.py" The first line is 431
decompDict = _tools.decompose_gate_matrix(closestUGateMx) |  | decompDict = _tools.decompose_gate_matrix(gate)
if decompDict['isValid']: angleQty = _getGateQuantity(decomp_cu_angle, gateset, label, eps, confidenceRegionInfo) diagQty = _getGateQuantity(decomp_cu_decay_diag, gateset, label, eps, confidenceRegionInfo) offdiagQty = _getGateQuantity(decomp_cu_decay_offdiag, gateset, label, eps, confidenceRegionInfo) errBarDict = {'pi rotations': angleQty.get_err_bar(), 'decay of diagonal rotation terms': diagQty.get_err_bar(), 'decay of off diagonal rotation terms': offdiagQty.get_err_bar()} decompQty = ReportableQty(decompDict, errBarDict) else: decompQty = ReportableQty({}) |  | if decompDict['isValid']: angleQty = _getGateQuantity(decomp_angle, gateset, label, eps, confidenceRegionInfo) diagQty = _getGateQuantity(decomp_decay_diag, gateset, label, eps, confidenceRegionInfo) offdiagQty = _getGateQuantity(decomp_decay_offdiag, gateset, label, eps, confidenceRegionInfo) errBarDict = {'pi rotations': angleQty.get_err_bar(), 'decay of diagonal rotation terms': diagQty.get_err_bar(), 'decay of off diagonal rotation terms': offdiagQty.get_err_bar()} decompQty = ReportableQty(decompDict, errBarDict) else: decompQty = ReportableQty({})

Clone # 48
Distance between two fragments = 4
Clone size = 11

Source file "report/table.py" The first line is 120 |  | Source file "report/table.py" The first line is 95
if (self._customHeadings is not None) and ('ppt' in self._customHeadings): raise ValueError(('custom headers unsupported for ') + ('powerpoint format')) |  | if (self._customHeadings is not None) and ('text' in self._customHeadings): raise ValueError('custom headers unsupported for text format')
if self._headingFormatters is not None: colHeadings_formatted = formatSet.formatList(self._headings, self._headingFormatters, 'ppt') else: colHeadings_formatted = self._headings['ppt'] |  | if self._headingFormatters is not None: colHeadings_formatted = formatSet.formatList(self._headings, self._headingFormatters, 'text') else: colHeadings_formatted = self._headings['text']
ppt = {'column names': colHeadings_formatted, 'row data': []} |  | text = {'column names': colHeadings_formatted, 'row data': []}

Clone # 49
Distance between two fragments = 2
Clone size = 10

Source file "report/results.py" The first line is 3421 |  | Source file "report/results.py" The first line is 2371
for key in tables_to_blank: qtys[key] = _generation.get_blank_table().render('latex', longtables=self.options.long_tables) qtys[('tt_') + (key)] = '' |  | for key in tables_to_blank: qtys[key] = _generation.get_blank_table().render('latex', longtables=self.options.long_tables) qtys[('tt_') + (key)] = ''
printer.log('*** Generating plots ***') |  | printer.log('*** Generating plots ***')
if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False |  | if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False
maxW, maxH = (6.5, 9.0) |  | maxW, maxH = (4.0, 3.0)

Clone # 50
Distance between two fragments = 3
Clone size = 10

Source file "report/results.py" The first line is 2439 |  | Source file "report/results.py" The first line is 1731
fig = self.figures.get(('estimateForLIndex%dColorBoxPlot') % (i), verbosity=(printer) - (1)) |  | fig = self.figures.get(('estimateForLIndex%dColorBoxPlot') % (i), verbosity=printer)
fig.save_to(_os.path.join(report_dir, D, ('L%d_%sBoxes.pdf') % ((i, plotFnName)))) |  | fig.save_to(_os.path.join(report_dir, D, ('L%d_%sBoxes.pdf') % ((i, plotFnName))))
lx = fig.get_extra_info()['nUsedXs'] |  | lx = fig.get_extra_info()['nUsedXs']
ly = fig.get_extra_info()['nUsedYs'] |  | ly = fig.get_extra_info()['nUsedYs']
W = ((float((lx) + (1))) / (float((maxX) + (1)))) * (maxW) |  | W = ((float((lx) + (1))) / (float((maxX) + (1)))) * (maxW)
H = ((float(ly)) / (float(maxY))) * (maxH) |  | H = ((float(ly)) / (float(maxY))) * (maxH)
pixplots += '\n' |  | pixplots += '\n'
pixplots += '\\begin{frame}\n' |  | pixplots += '\\begin{figure}\n'

Clone # 51
Distance between two fragments = 3
Clone size = 10

Source file "report/plotting.py" The first line is 2396 |  | Source file "report/plotting.py" The first line is 2236
logLMx = _np.zeros((len(strs[1]), len(strs[0])), 'd') |  | chiSqMx = _np.zeros((len(strs[1]), len(strs[0])), 'd')
if sigma is None: return (_np.nan) * (logLMx) |  | if sigma is None: return (_np.nan) * (chiSqMx)
cntMx = total_count_matrix(sigma, dataset, strs, fidPairs) |  | cntMx = total_count_matrix(sigma, dataset, strs, fidPairs)
gs_direct = directGateset |  | gs_direct = directGateset
for sl in gs_direct.get_spam_labels(): probMx = probability_matrix(_objs.GateString(('GsigmaLbl')), gs_direct, sl, strs, fidPairs) freqMx = frequency_matrix(sigma, dataset, sl, strs, fidPairs) logLMx += _tools.two_delta_loglfn(cntMx, probMx, freqMx, minProbClip) |  | for sl in gs_direct.get_spam_labels(): probMx = probability_matrix(_objs.GateString(('GsigmaLbl')), gs_direct, sl, strs, fidPairs) freqMx = frequency_matrix(sigma, dataset, sl, strs, fidPairs) chiSqMx += _tools.chi2fn(cntMx, probMx, freqMx, minProbClipForWeighting)
return logLMx |  | return chiSqMx

Clone # 52
Distance between two fragments = 0
Clone size = 9

Source file "report/plotting.py" The first line is 1170 |  | Source file "report/plotting.py" The first line is 1121
histdata_finite = _np.take(histdata, _np.where(_np.isfinite(histdata)))[0] |  | histdata_finite = _np.take(histdata, _np.where(_np.isfinite(histdata)))[0]
histMin = min( histdata_finite ) if cmapFactory.vmin is None else cmapFactory.vmin |  | histMin = min( histdata_finite ) if cmapFactory.vmin is None else cmapFactory.vmin
histMax = max( histdata_finite ) if cmapFactory.vmax is None else cmapFactory.vmax |  | histMax = max( histdata_finite ) if cmapFactory.vmax is None else cmapFactory.vmax
_plt.hist(_np.clip(histdata_finite, histMin, histMax), histBins, range=[histMin, histMax], facecolor='gray', align='mid') |  | _plt.hist(_np.clip(histdata_finite, histMin, histMax), histBins, range=[histMin, histMax], facecolor='gray', align='mid')
if save_to is not None: if len(save_to) > 0: _plt.savefig(_makeHistFilename(save_to)) _plt.close(fig) |  | if save_to is not None: if len(save_to) > 0: _plt.savefig(_makeHistFilename(save_to)) _plt.close(fig)

Clone # 53
Distance between two fragments = 1
Clone size = 9

Source file "report/results.py" The first line is 1689 |  | Source file "report/results.py" The first line is 2808
Ls = self.parameters['max length list'] |  | Ls = self.parameters['max length list']
st = 1 if Ls[0] == 0 else 0 #start index: skip LGST column in plots |  | st = 1 if Ls[0] == 0 else 0 #start index: skip LGST col in box plots
nPlots = (len(Ls[st:])-1)+2 if pixelPlotAppendix else 2 |  | nPlots = (len(Ls[st:])-1)+1 if pixelPlotAppendix else 1
if self.parameters['objective'] == 'chi2': plotFnName, plotFnLatex = ('Chi2', '$\\chi^2$') elif self.parameters['objective'] == 'logl': plotFnName, plotFnLatex = ('LogL', '$\\log(\\mathcal{L})$') else: raise ValueError(('Invalid objective value: %s') % (self.parameters['objective'])) |  | if self.parameters['objective'] == 'chi2': plotFnName, plotFnLatex = ('Chi2', '$\\chi^2$') elif self.parameters['objective'] == 'logl': plotFnName, plotFnLatex = ('LogL', '$\\log(\\mathcal{L})$') else: raise ValueError(('Invalid objective value: %s') % (self.parameters['objective']))

Clone # 54
Distance between two fragments = 1
Clone size = 9

Source file "report/results.py" The first line is 1689 |  | Source file "report/results.py" The first line is 2405
Ls = self.parameters['max length list'] |  | Ls = self.parameters['max length list']
st = 1 if Ls[0] == 0 else 0 #start index: skip LGST column in plots |  | st = 1 if Ls[0] == 0 else 0 #start index: skip LGST col in box plots
nPlots = (len(Ls[st:])-1)+2 if pixelPlotAppendix else 2 |  | nPlots = (len(Ls[st:])-1)+1 if pixelPlotAppendix else 1
if self.parameters['objective'] == 'chi2': plotFnName, plotFnLatex = ('Chi2', '$\\chi^2$') elif self.parameters['objective'] == 'logl': plotFnName, plotFnLatex = ('LogL', '$\\log(\\mathcal{L})$') else: raise ValueError(('Invalid objective value: %s') % (self.parameters['objective'])) |  | if self.parameters['objective'] == 'chi2': plotFnName, plotFnLatex = ('Chi2', '$\\chi^2$') elif self.parameters['objective'] == 'logl': plotFnName, plotFnLatex = ('LogL', '$\\log(\\mathcal{L})$') else: raise ValueError(('Invalid objective value: %s') % (self.parameters['objective']))

Clone # 55
Distance between two fragments = 0
Clone size = 9

Source file "report/results.py" The first line is 2276 |  | Source file "report/results.py" The first line is 2712
if title == 'auto': title = ('GST on %s') % (datasetLabel) |  | if title == 'auto': title = ('GST on %s') % (datasetLabel)
best_gs = self.gatesets['final estimate'] |  | best_gs = self.gatesets['final estimate']
if not self._LsAndGermInfoSet: debugAidsAppendix = False pixelPlotAppendix = False whackamoleAppendix = False |  | if not self._LsAndGermInfoSet: debugAidsAppendix = False pixelPlotAppendix = False whackamoleAppendix = False
qtys = {} |  | qtys = {}
qtys['title'] = title |  | qtys['title'] = title
qtys['datasetLabel'] = datasetLabel |  | qtys['datasetLabel'] = datasetLabel

Clone # 56
Distance between two fragments = 0
Clone size = 9

Source file "report/results.py" The first line is 2258 |  | Source file "report/results.py" The first line is 2694
default_dir = self.parameters['defaultDirectory'] |  | default_dir = self.parameters['defaultDirectory']
default_base = self.parameters['defaultBasename'] |  | default_base = self.parameters['defaultBasename']
if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) else "GSTSlides" report_base += suffix |  | if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) else "GSTSlides" report_base += suffix

Clone # 57
Distance between two fragments = 1
Clone size = 11

Source file "report/results.py" The first line is 3289 |  | Source file "report/results.py" The first line is 2694
default_dir = self.parameters['defaultDirectory'] |  | default_dir = self.parameters['defaultDirectory']
default_base = self.parameters['defaultBasename'] |  | default_base = self.parameters['defaultBasename']
if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] \ + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) \ else "GSTReport" report_base += suffix |  | if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) else "GSTSlides" report_base += suffix

Clone # 58
Distance between two fragments = 1
Clone size = 11

Source file "report/results.py" The first line is 2694 |  | Source file "report/results.py" The first line is 1511
default_dir = self.parameters['defaultDirectory'] |  | default_dir = self.parameters['defaultDirectory']
default_base = self.parameters['defaultBasename'] |  | default_base = self.parameters['defaultBasename']
if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) else "GSTSlides" report_base += suffix |  | if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] \ + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) \ else "GSTReport" report_base += suffix

Clone # 59
Distance between two fragments = 1
Clone size = 9

Source file "report/results.py" The first line is 2694 |  | Source file "report/results.py" The first line is 1985
default_dir = self.parameters['defaultDirectory'] |  | default_dir = self.parameters['defaultDirectory']
default_base = self.parameters['defaultBasename'] |  | default_base = self.parameters['defaultBasename']
if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) else "GSTSlides" report_base += suffix |  | if filename != "auto": report_dir = _os.path.dirname(filename) report_base = _os.path.splitext( _os.path.basename(filename) )[0] + suffix else: cwd = _os.getcwd() report_dir = default_dir if (default_dir is not None) else cwd report_base = default_base if (default_base is not None) else "GSTBrief" report_base += suffix

Clone # 60
Distance between two fragments = 2
Clone size = 9

Source file "report/generation.py" The first line is 818 |  | Source file "report/generation.py" The first line is 736
gate = gateset.gates[gl] |  | gate = gateset.gates[gl]
targetGate = targetGateset.gates[gl] |  | targetGate = targetGateset.gates[gl]
fig = _plotting.polar_eigenval_plot(gate, targetGate, title=gl, save_to='', showNormal=False, showRelative=True) |  | fig = _plotting.polar_eigenval_plot(gate, targetGate, title=gl, save_to='', showNormal=True, showRelative=False)
sz = min((0.95) * ((maxHeight) / (nRows)), ((0.95) * (0.75)) * ((maxWidth) - (0.5))) |  | sz = min((0.95) * ((maxHeight) / (nRows)), ((0.95) * (0.75)) * ((maxWidth) - (0.5)))
sz = min(sz, 2.0) |  | sz = min(sz, 2.0)
nm = ((figFilePrefix) + ('_')) + (gl) |  | nm = ((figFilePrefix) + ('_')) + (gl)
figInfo = (fig, nm, sz, sz) |  | figInfo = (fig, nm, sz, sz)

Clone # 61
Distance between two fragments = 3
Clone size = 10

Source file "report/plotting.py" The first line is 265 |  | Source file "report/plotting.py" The first line is 221
prepStrs, effectStrs = strs |  | prepStrs, effectStrs = strs
logLMx = _np.zeros((len(effectStrs), len(prepStrs)), 'd') |  | chiSqMx = _np.zeros((len(effectStrs), len(prepStrs)), 'd')
if gateString is None: return (_np.nan) * (logLMx) |  | if gateString is None: return (_np.nan) * (chiSqMx)
cntMx = total_count_matrix(gateString, dataset, strs, fidPairs) |  | cntMx = total_count_matrix(gateString, dataset, strs, fidPairs)
for sl in gateset.get_spam_labels(): probMx = probability_matrix(gateString, gateset, sl, strs, fidPairs) freqMx = frequency_matrix(gateString, dataset, sl, strs, fidPairs) logLMx += _tools.two_delta_loglfn(cntMx, probMx, freqMx, minProbClip) |  | for sl in gateset.get_spam_labels(): probMx = probability_matrix(gateString, gateset, sl, strs, fidPairs) freqMx = frequency_matrix(gateString, dataset, sl, strs, fidPairs) chiSqMx += _tools.chi2fn(cntMx, probMx, freqMx, minProbClipForWeighting)
return logLMx |  | return chiSqMx

Clone # 62
Distance between two fragments = 3
Clone size = 9

Source file "report/results.py" The first line is 3331 |  | Source file "report/results.py" The first line is 2026
qtys = {} |  | qtys = {}
qtys['title'] = title |  | qtys['title'] = title
qtys['datasetLabel'] = datasetLabel |  | qtys['datasetLabel'] = datasetLabel
qtys['settoggles'] = "\\toggle%s{confidences}\n" % \ ("false" if confidenceLevel is None else "true") |  | qtys['settoggles'] = "\\toggle%s{confidences}\n" % \ ("false" if confidenceLevel is None else "true")
qtys['settoggles'] += "\\toggle%s{LsAndGermsSet}\n" % \ ("true" if self._LsAndGermInfoSet else "false") |  | qtys['settoggles'] += "\\toggle%s{goodnessSection}\n" % \ ("true" if goodnessOfFitSection else "false")
qtys['confidenceLevel'] = "%g" % \ confidenceLevel if confidenceLevel is not None else "NOT-SET" |  | qtys['confidenceLevel'] = "%g" % confidenceLevel \ if confidenceLevel is not None else "NOT-SET"

Clone # 63
Distance between two fragments = 4
Clone size = 9

Source file "report/results.py" The first line is 286 |  | Source file "report/results.py" The first line is 282
s += ' ---------------------------------------------------------\n' |  | s += ' ---------------------------------------------------------\n'
s += ((' ') + ('\n '.join(list(self.gatestring_lists.keys())))) + ('\n') |  | s += ((' ') + ('\n '.join(list(self.gatesets.keys())))) + ('\n')
s += '\n' |  | s += '\n'
s += ' .tables -- a dict of ReportTable objects w/keys:\n' |  | s += ' .gatestring_lists -- a dict of GateString lists w/keys:\n'
s += ' ---------------------------------------------------------\n' |  | s += ' ---------------------------------------------------------\n'
s += ((' ') + ('\n '.join(list(self.tables.keys())))) + ('\n') |  | s += ((' ') + ('\n '.join(list(self.gatestring_lists.keys())))) + ('\n')
s += '\n' |  | s += '\n'
s += ' .figures -- a dict of ReportFigure objects w/keys:\n' |  | s += ' .tables -- a dict of ReportTable objects w/keys:\n'
s += ' ---------------------------------------------------------\n' |  | s += ' ---------------------------------------------------------\n'

Clone # 64
Distance between two fragments = 4
Clone size = 9

Source file "report/results.py" The first line is 290 |  | Source file "report/results.py" The first line is 282
s += ' ---------------------------------------------------------\n' |  | s += ' ---------------------------------------------------------\n'
s += ((' ') + ('\n '.join(list(self.tables.keys())))) + ('\n') |  | s += ((' ') + ('\n '.join(list(self.gatesets.keys())))) + ('\n')
s += '\n' |  | s += '\n'
s += ' .figures -- a dict of ReportFigure objects w/keys:\n' |  | s += ' .gatestring_lists -- a dict of GateString lists w/keys:\n'
s += ' ---------------------------------------------------------\n' |  | s += ' ---------------------------------------------------------\n'
s += ((' ') + ('\n '.join(list(self.figures.keys())))) + ('\n') |  | s += ((' ') + ('\n '.join(list(self.gatestring_lists.keys())))) + ('\n')
s += '\n' |  | s += '\n'
s += ' .parameters -- a dict of simulation parameters:\n' |  | s += ' .tables -- a dict of ReportTable objects w/keys:\n'
s += ' ---------------------------------------------------------\n' |  | s += ' ---------------------------------------------------------\n'

Clone # 65
Distance between two fragments = 4
Clone size = 9

Source file "report/results.py" The first line is 294 |  | Source file "report/results.py" The first line is 282
s += ' ---------------------------------------------------------\n' |  | s += ' ---------------------------------------------------------\n'
s += ((' ') + ('\n '.join(list(self.figures.keys())))) + ('\n') |  | s += ((' ') + ('\n '.join(list(self.gatesets.keys())))) + ('\n')
s += '\n' |  | s += '\n'
s += ' .parameters -- a dict of simulation parameters:\n' |  | s += ' .gatestring_lists -- a dict of GateString lists w/keys:\n'
s += ' ---------------------------------------------------------\n' |  | s += ' ---------------------------------------------------------\n'
s += ((' ') + ('\n '.join(list(self.parameters.keys())))) + ('\n') |  | s += ((' ') + ('\n '.join(list(self.gatestring_lists.keys())))) + ('\n')
s += '\n' |  | s += '\n'
s += ' .options -- a container of display options:\n' |  | s += ' .tables -- a dict of ReportTable objects w/keys:\n'
s += ' ---------------------------------------------------------\n' |  | s += ' ---------------------------------------------------------\n'

Clone # 66
Distance between two fragments = 3
Clone size = 9

Source file "report/generation.py" The first line is 403 |  | Source file "report/generation.py" The first line is 392
formatters = (['Effect']) + ((['ErrorBars']) * (len(qtyNames))) |  | formatters = (['Rho']) + ((['ErrorBars']) * (len(qtyNames)))
qtys_to_compute = [('%s effect %s') % ((l, qty)) for qty in qtyNames for l in effectLabels ] |  | qtys_to_compute = [('%s prep %s') % ((l, qty)) for qty in qtyNames for l in prepLabels ]
qtys = _cr.compute_gateset_gateset_qtys(qtys_to_compute, gateset, targetGateset, confidenceRegionInfo) |  | qtys = _cr.compute_gateset_gateset_qtys(qtys_to_compute, gateset, targetGateset, confidenceRegionInfo)
for l in effectLabels: if confidenceRegionInfo is None: rowData = ([l]) + ([(qtys[('%s effect %s') % ((l, qty))].get_value(), None) for qty in qtyNames ]) else: rowData = ([l]) + ([qtys[('%s effect %s') % ((l, qty))].get_value_and_err_bar() for qty in qtyNames ]) table.addrow(rowData, formatters) |  | for l in prepLabels: if confidenceRegionInfo is None: rowData = ([l]) + ([(qtys[('%s prep %s') % ((l, qty))].get_value(), None) for qty in qtyNames ]) else: rowData = ([l]) + ([qtys[('%s prep %s') % ((l, qty))].get_value_and_err_bar() for qty in qtyNames ]) table.addrow(rowData, formatters)

Clone # 67
Distance between two fragments = 4
Clone size = 9

Source file "report/results.py" The first line is 2037 |  | Source file "report/results.py" The first line is 2731
qtys['gofObjective'] = "$2\\Delta\\log{\\mathcal{L}}$" \ if obj == "logl" else "$\\chi^2$" |  | qtys['gofObjective'] = "$2\\Delta\\log{\\mathcal{L}}$" \ if self.parameters['objective'] == "logl" else "$\\chi^2$"
if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET' |  | if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET'

Clone # 68
Distance between two fragments = 4
Clone size = 9

Source file "report/results.py" The first line is 921 |  | Source file "report/results.py" The first line is 901
def fn_validate(key): if not self._bEssentialResultsSet: return [] keys = [('targetGateBoxes%s') % (gl) for gl in self.gatesets['final estimate'].gates ] if key == expr5: return keys elif key in keys: return [key] else: return [] |  | def fn_validate(key): if not self._bEssentialResultsSet: return [] keys = [('bestGateErrGenBoxes%s') % (gl) for gl in self.gatesets['final estimate'].gates ] if key == expr4: return keys elif key in keys: return [key] else: return []
fns[expr5] = (fn, fn_validate) |  | fns[expr4] = (fn, fn_validate)
expr6 = 'bestEstimatePolar(.+?)EvalPlot' |  | expr5 = 'targetGateBoxes(.+)'

Clone # 69
Distance between two fragments = 4
Clone size = 9

Source file "report/results.py" The first line is 921 |  | Source file "report/results.py" The first line is 940
def fn_validate(key): if not self._bEssentialResultsSet: return [] keys = [('targetGateBoxes%s') % (gl) for gl in self.gatesets['final estimate'].gates ] if key == expr5: return keys elif key in keys: return [key] else: return [] |  | def fn_validate(key): if not self._bEssentialResultsSet: return [] keys = [('bestEstimatePolar%sEvalPlot') % (gl) for gl in self.gatesets['final estimate'].gates ] if key == expr6: return keys elif key in keys: return [key] else: return []
fns[expr5] = (fn, fn_validate) |  | fns[expr6] = (fn, fn_validate)
expr6 = 'bestEstimatePolar(.+?)EvalPlot' |  | expr7 = 'pauliProdHamiltonianDecompBoxes(.+)'

Clone # 70
Distance between two fragments = 4
Clone size = 9

Source file "report/results.py" The first line is 901 |  | Source file "report/results.py" The first line is 940
def fn_validate(key): if not self._bEssentialResultsSet: return [] keys = [('bestGateErrGenBoxes%s') % (gl) for gl in self.gatesets['final estimate'].gates ] if key == expr4: return keys elif key in keys: return [key] else: return [] |  | def fn_validate(key): if not self._bEssentialResultsSet: return [] keys = [('bestEstimatePolar%sEvalPlot') % (gl) for gl in self.gatesets['final estimate'].gates ] if key == expr6: return keys elif key in keys: return [key] else: return []
fns[expr4] = (fn, fn_validate) |  | fns[expr6] = (fn, fn_validate)
expr5 = 'targetGateBoxes(.+)' |  | expr7 = 'pauliProdHamiltonianDecompBoxes(.+)'

Clone # 71
Distance between two fragments = 1
Clone size = 9

Source file "report/generation.py" The first line is 1065 |  | Source file "report/generation.py" The first line is 1007
pv = (1.0) - (_stats.chi2.cdf(twoDeltaLogL, k)) |  | pv = (1.0) - (_stats.chi2.cdf(chi2, k))
if (twoDeltaLogL) - (k) < _np.sqrt((2) * (k)): rating = 5 elif (twoDeltaLogL) - (k) < (2) * (k): rating = 4 elif (twoDeltaLogL) - (k) < (5) * (k): rating = 3 elif (twoDeltaLogL) - (k) < (10) * (k): rating = 2 else: rating = 1 |  | if (chi2) - (k) < _np.sqrt((2) * (k)): rating = 5 elif (chi2) - (k) < (2) * (k): rating = 4 elif (chi2) - (k) < (5) * (k): rating = 3 elif (chi2) - (k) < (10) * (k): rating = 2 else: rating = 1
table.addrow((str(L), twoDeltaLogL, k, (twoDeltaLogL) - (k), _np.sqrt((2) * (k)), pv, Ns, Np, ('') * (rating)), (None, 'Normal', 'Normal', 'Normal', 'Normal', 'Rounded', 'Normal', 'Normal', 'Conversion')) |  | table.addrow((str(L), chi2, k, (chi2) - (k), _np.sqrt((2) * (k)), pv, Ns, Np, ('') * (rating)), (None, 'Normal', 'Normal', 'Normal', 'Normal', 'Rounded', 'Normal', 'Normal', 'Conversion'))

Clone # 72
Distance between two fragments = 0
Clone size = 9

Source file "report/generation.py" The first line is 193 |  | Source file "report/generation.py" The first line is 253
intervalVec = confidenceRegionInfo.get_profile_likelihood_confidence_intervals(gl)[None:None,None] |  | intervalVec = confidenceRegionInfo.get_profile_likelihood_confidence_intervals(gl)[None:None,None]
if isinstance(gateset.gates[gl], _objs.FullyParameterizedGate): gate_dim = gateset.get_dimension() intervalMx = intervalVec.reshape(gate_dim, gate_dim) elif isinstance(gateset.gates[gl], _objs.TPParameterizedGate): gate_dim = gateset.get_dimension() intervalMx = _np.concatenate((_np.zeros((1, gate_dim), 'd'), intervalVec.reshape((gate_dim) - (1), gate_dim)), axis=0) else: intervalMx = intervalVec |  | if isinstance(gateset.gates[gl], _objs.FullyParameterizedGate): gate_dim = gateset.get_dimension() intervalMx = intervalVec.reshape(gate_dim, gate_dim) elif isinstance(gateset.gates[gl], _objs.TPParameterizedGate): gate_dim = gateset.get_dimension() intervalMx = _np.concatenate((_np.zeros((1, gate_dim), 'd'), intervalVec.reshape((gate_dim) - (1), gate_dim)), axis=0) else: intervalMx = intervalVec

Clone # 73
Distance between two fragments = 0
Clone size = 9

Source file "report/results.py" The first line is 2092 |  | Source file "report/results.py" The first line is 3421
for key in tables_to_blank: qtys[key] = _generation.get_blank_table().render('latex', longtables=self.options.long_tables) qtys[('tt_') + (key)] = '' |  | for key in tables_to_blank: qtys[key] = _generation.get_blank_table().render('latex', longtables=self.options.long_tables) qtys[('tt_') + (key)] = ''
printer.log('*** Generating plots ***') |  | printer.log('*** Generating plots ***')
if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False |  | if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False

Clone # 74
Distance between two fragments = 3
Clone size = 9

Source file "report/results.py" The first line is 2839 |  | Source file "report/results.py" The first line is 1729
printer.show_progress(i, (len(Ls)) - (2), prefix='', end='') |  | printer.show_progress(i, (len(Ls)) - (2), prefix='', end='')
fig = self.figures.get(('estimateForLIndex%dColorBoxPlot') % (i), verbosity=(printer) - (1)) |  | fig = self.figures.get(('estimateForLIndex%dColorBoxPlot') % (i), verbosity=printer)
fig.save_to(_os.path.join(report_dir, D, ('L%d_%sBoxes.png') % ((i, plotFnName)))) |  | fig.save_to(_os.path.join(report_dir, D, ('L%d_%sBoxes.pdf') % ((i, plotFnName))))
lx = fig.get_extra_info()['nUsedXs'] |  | lx = fig.get_extra_info()['nUsedXs']
ly = fig.get_extra_info()['nUsedYs'] |  | ly = fig.get_extra_info()['nUsedYs']
W = ((float((lx) + (1))) / (float((maxX) + (1)))) * (maxW) |  | W = ((float((lx) + (1))) / (float((maxX) + (1)))) * (maxW)
H = ((float(ly)) / (float(maxY))) * (maxH) |  | H = ((float(ly)) / (float(maxY))) * (maxH)

Clone # 75
Distance between two fragments = 0
Clone size = 9

Source file "report/plotting.py" The first line is 1239 |  | Source file "report/plotting.py" The first line is 1084
def val_filter(vals): formatted_vals = [] for val in vals: if (type(val) in (tuple, _objs.GateString)) and (all([type(el) == str for el in val ])): if len(val) == 0: formatted_vals.append('$\\{\\}$') else: formatted_vals.append((('$') + ('\\cdot'.join([('\\mathrm{%s}') % (el) for el in val ]))) + ('$')) else: formatted_vals.append(val) return formatted_vals |  | def val_filter(vals): formatted_vals = [] for val in vals: if (type(val) in (tuple, _objs.GateString)) and (all([type(el) == str for el in val ])): if len(val) == 0: formatted_vals.append('$\\{\\}$') else: formatted_vals.append((('$') + ('\\cdot'.join([('\\mathrm{%s}') % (el) for el in val ]))) + ('$')) else: formatted_vals.append(val) return formatted_vals

Clone # 76
Distance between two fragments = 3
Clone size = 8

Source file "report/generation.py" The first line is 830 |  | Source file "report/generation.py" The first line is 748
if confidenceRegionInfo is None: rel_evals = qtys[('%s relative eigenvalues') % (gl)].get_value() rel_evals = rel_evals.reshape((rel_evals.size) // (2), 2) rowData = [gl, (rel_evals, None), figInfo] else: rel_evals, rel_evalsEB = qtys[('%s relative eigenvalues') % (gl)].get_value_and_err_bar() rel_evals = rel_evals.reshape((rel_evals.size) // (2), 2) rowData = [gl, (rel_evals, rel_evalsEB), figInfo] |  | if confidenceRegionInfo is None: evals = qtys[('%s eigenvalues') % (gl)].get_value() evals = evals.reshape((evals.size) // (2), 2) rowData = [gl, (evals, None), figInfo] else: evals, evalsEB = qtys[('%s eigenvalues') % (gl)].get_value_and_err_bar() evals = evals.reshape((evals.size) // (2), 2) rowData = [gl, (evals, evalsEB), figInfo]
table.addrow(rowData, formatters) |  | table.addrow(rowData, formatters)

Clone # 77
Distance between two fragments = 4
Clone size = 8

Source file "report/results.py" The first line is 557 |  | Source file "report/results.py" The first line is 566
fns['bestGatesetGaugeOptParamsTable'] = (fn, validate_essential) |  | fns['chi2ProgressTable'] = (fn, validate_LsAndGerms)
def fn(key, confidenceLevel, vb): setup() return _generation.get_chi2_progress_table(self.parameters['max length list'], self.gatesets['iteration estimates'], self.gatestring_lists['iteration'], self.dataset) |  | def fn(key, confidenceLevel, vb): setup() return _generation.get_logl_progress_table(self.parameters['max length list'], self.gatesets['iteration estimates'], self.gatestring_lists['iteration'], self.dataset)
fns['chi2ProgressTable'] = (fn, validate_LsAndGerms) |  | fns['logLProgressTable'] = (fn, validate_LsAndGerms)

Clone # 78
Distance between two fragments = 4
Clone size = 8

Source file "report/results.py" The first line is 754 |  | Source file "report/results.py" The first line is 762
fns[expr1] = (fn, fn_validate) |  | fns['blankBoxPlot'] = (fn, validate_LsAndGerms)
def fn(key, confidenceLevel, vb): noConfidenceLevelDependence(confidenceLevel) Ls, germs, _, _, _, _, baseStr_dict, strs, st = plot_setup() return _plotting.blank_boxplot(Ls[st:], germs, baseStr_dict, strs, '$L$', 'germ', scale=1.0, title='', sumUp=False, save_to='', ticSize=20) |  | def fn(key, confidenceLevel, vb): noConfidenceLevelDependence(confidenceLevel) Ls, germs, _, _, _, _, baseStr_dict, strs, st = plot_setup() return _plotting.blank_boxplot(Ls[st:], germs, baseStr_dict, strs, '$L$', 'germ', scale=1.0, title='', sumUp=True, save_to='', ticSize=20)
fns['blankBoxPlot'] = (fn, validate_LsAndGerms) |  | fns['blankSummedBoxPlot'] = (fn, validate_LsAndGerms)

Clone # 79
Distance between two fragments = 0
Clone size = 8

Source file "report/results.py" The first line is 2352 |  | Source file "report/results.py" The first line is 1616
ls_and_germs_tables = ('fiducialListTable', 'prepStrListTable', 'effectStrListTable', 'germListTable', 'progressTable') |  | ls_and_germs_tables = ('fiducialListTable', 'prepStrListTable', 'effectStrListTable', 'germListTable', 'progressTable')
tables_to_compute = std_tables |  | tables_to_compute = std_tables
tables_to_blank = [] |  | tables_to_blank = []
if self._LsAndGermInfoSet: tables_to_compute += ls_and_germs_tables else: tables_to_blank += ls_and_germs_tables |  | if self._LsAndGermInfoSet: tables_to_compute += ls_and_germs_tables else: tables_to_blank += ls_and_germs_tables

Clone # 80
Distance between two fragments = 1
Clone size = 8

Source file "report/results.py" The first line is 2352 |  | Source file "report/results.py" The first line is 3395
ls_and_germs_tables = ('fiducialListTable', 'prepStrListTable', 'effectStrListTable', 'germListTable', 'progressTable') |  | ls_and_germs_tables = ('fiducialListTable', 'prepStrListTable', 'effectStrListTable', 'germList2ColTable', 'progressTable')
tables_to_compute = std_tables |  | tables_to_compute = std_tables
tables_to_blank = [] |  | tables_to_blank = []
if self._LsAndGermInfoSet: tables_to_compute += ls_and_germs_tables else: tables_to_blank += ls_and_germs_tables |  | if self._LsAndGermInfoSet: tables_to_compute += ls_and_germs_tables else: tables_to_blank += ls_and_germs_tables

Clone # 81
Distance between two fragments = 0
Clone size = 8

Source file "report/results.py" The first line is 2759 |  | Source file "report/results.py" The first line is 1616
ls_and_germs_tables = ('fiducialListTable', 'prepStrListTable', 'effectStrListTable', 'germListTable', 'progressTable') |  | ls_and_germs_tables = ('fiducialListTable', 'prepStrListTable', 'effectStrListTable', 'germListTable', 'progressTable')
tables_to_compute = std_tables |  | tables_to_compute = std_tables
tables_to_blank = [] |  | tables_to_blank = []
if self._LsAndGermInfoSet: tables_to_compute += ls_and_germs_tables else: tables_to_blank += ls_and_germs_tables |  | if self._LsAndGermInfoSet: tables_to_compute += ls_and_germs_tables else: tables_to_blank += ls_and_germs_tables

Clone # 82
Distance between two fragments = 1
Clone size = 8

Source file "report/results.py" The first line is 2759 |  | Source file "report/results.py" The first line is 3395
ls_and_germs_tables = ('fiducialListTable', 'prepStrListTable', 'effectStrListTable', 'germListTable', 'progressTable') |  | ls_and_germs_tables = ('fiducialListTable', 'prepStrListTable', 'effectStrListTable', 'germList2ColTable', 'progressTable')
tables_to_compute = std_tables |  | tables_to_compute = std_tables
tables_to_blank = [] |  | tables_to_blank = []
if self._LsAndGermInfoSet: tables_to_compute += ls_and_germs_tables else: tables_to_blank += ls_and_germs_tables |  | if self._LsAndGermInfoSet: tables_to_compute += ls_and_germs_tables else: tables_to_blank += ls_and_germs_tables

Clone # 83
Distance between two fragments = 1
Clone size = 8

Source file "report/results.py" The first line is 1616 |  | Source file "report/results.py" The first line is 3395
ls_and_germs_tables = ('fiducialListTable', 'prepStrListTable', 'effectStrListTable', 'germListTable', 'progressTable') |  | ls_and_germs_tables = ('fiducialListTable', 'prepStrListTable', 'effectStrListTable', 'germList2ColTable', 'progressTable')
tables_to_compute = std_tables |  | tables_to_compute = std_tables
tables_to_blank = [] |  | tables_to_blank = []
if self._LsAndGermInfoSet: tables_to_compute += ls_and_germs_tables else: tables_to_blank += ls_and_germs_tables |  | if self._LsAndGermInfoSet: tables_to_compute += ls_and_germs_tables else: tables_to_blank += ls_and_germs_tables

Clone # 84
Distance between two fragments = 0
Clone size = 8

Source file "report/results.py" The first line is 1172 |  | Source file "report/results.py" The first line is 666
baseStr_dict = self._getBaseStrDict() |  | baseStr_dict = self._getBaseStrDict()
strs = (self.gatestring_lists['prep fiducials'], self.gatestring_lists['effect fiducials']) |  | strs = (self.gatestring_lists['prep fiducials'], self.gatestring_lists['effect fiducials'])
germs = self.gatestring_lists['germs'] |  | germs = self.gatestring_lists['germs']
gsBest = self.gatesets['final estimate'] |  | gsBest = self.gatesets['final estimate']
fidPairs = self.parameters['fiducial pairs'] |  | fidPairs = self.parameters['fiducial pairs']
Ls = self.parameters['max length list'] |  | Ls = self.parameters['max length list']
st = 1 if Ls[0] == 0 else 0 #start index: skip LGST column in plots |  | st = 1 if Ls[0] == 0 else 0 #start index: skip LGST column in plots

Clone # 85
Distance between two fragments = 4
Clone size = 8

Source file "report/results.py" The first line is 295 |  | Source file "report/results.py" The first line is 291
s += ((' ') + ('\n '.join(list(self.figures.keys())))) + ('\n') |  | s += ((' ') + ('\n '.join(list(self.tables.keys())))) + ('\n')
s += '\n' |  | s += '\n'
s += ' .parameters -- a dict of simulation parameters:\n' |  | s += ' .figures -- a dict of ReportFigure objects w/keys:\n'
s += ' ---------------------------------------------------------\n' |  | s += ' ---------------------------------------------------------\n'
s += ((' ') + ('\n '.join(list(self.parameters.keys())))) + ('\n') |  | s += ((' ') + ('\n '.join(list(self.figures.keys())))) + ('\n')
s += '\n' |  | s += '\n'
s += ' .options -- a container of display options:\n' |  | s += ' .parameters -- a dict of simulation parameters:\n'
s += ' ---------------------------------------------------------\n' |  | s += ' ---------------------------------------------------------\n'

Clone # 86
Distance between two fragments = 2
Clone size = 8

Source file "report/results.py" The first line is 962 |  | Source file "report/results.py" The first line is 940
def fn_validate(key): if not self._bEssentialResultsSet: return [] keys = [('pauliProdHamiltonianDecompBoxes%s') % (gl) for gl in self.gatesets['final estimate'].gates ] if key == expr7: return keys elif key in keys: return [key] else: return [] |  | def fn_validate(key): if not self._bEssentialResultsSet: return [] keys = [('bestEstimatePolar%sEvalPlot') % (gl) for gl in self.gatesets['final estimate'].gates ] if key == expr6: return keys elif key in keys: return [key] else: return []
fns[expr7] = (fn, fn_validate) |  | fns[expr6] = (fn, fn_validate)

Clone # 87
Distance between two fragments = 2
Clone size = 8

Source file "report/results.py" The first line is 962 |  | Source file "report/results.py" The first line is 921
def fn_validate(key): if not self._bEssentialResultsSet: return [] keys = [('pauliProdHamiltonianDecompBoxes%s') % (gl) for gl in self.gatesets['final estimate'].gates ] if key == expr7: return keys elif key in keys: return [key] else: return [] |  | def fn_validate(key): if not self._bEssentialResultsSet: return [] keys = [('targetGateBoxes%s') % (gl) for gl in self.gatesets['final estimate'].gates ] if key == expr5: return keys elif key in keys: return [key] else: return []
fns[expr7] = (fn, fn_validate) |  | fns[expr5] = (fn, fn_validate)

Clone # 88
Distance between two fragments = 2
Clone size = 8

Source file "report/results.py" The first line is 962 |  | Source file "report/results.py" The first line is 901
def fn_validate(key): if not self._bEssentialResultsSet: return [] keys = [('pauliProdHamiltonianDecompBoxes%s') % (gl) for gl in self.gatesets['final estimate'].gates ] if key == expr7: return keys elif key in keys: return [key] else: return [] |  | def fn_validate(key): if not self._bEssentialResultsSet: return [] keys = [('bestGateErrGenBoxes%s') % (gl) for gl in self.gatesets['final estimate'].gates ] if key == expr4: return keys elif key in keys: return [key] else: return []
fns[expr7] = (fn, fn_validate) |  | fns[expr4] = (fn, fn_validate)

Clone # 89
Distance between two fragments = 4
Clone size = 8

Source file "report/reportables.py" The first line is 341 |  | Source file "report/reportables.py" The first line is 336
def decomp_cu_decay_diag(gate): closestUGateMx = _alg.find_closest_unitary_gatemx(gate) decomp = _tools.decompose_gate_matrix(closestUGateMx) return decomp.get('decay of diagonal rotation terms', 0) |  | def decomp_cu_angle(gate): closestUGateMx = _alg.find_closest_unitary_gatemx(gate) decomp = _tools.decompose_gate_matrix(closestUGateMx) return decomp.get('pi rotations', 0)
def decomp_cu_decay_offdiag(gate): closestUGateMx = _alg.find_closest_unitary_gatemx(gate) decomp = _tools.decompose_gate_matrix(closestUGateMx) return decomp.get('decay of off diagonal rotation terms', 0) |  | def decomp_cu_decay_diag(gate): closestUGateMx = _alg.find_closest_unitary_gatemx(gate) decomp = _tools.decompose_gate_matrix(closestUGateMx) return decomp.get('decay of diagonal rotation terms', 0)

Clone # 90
Distance between two fragments = 2
Clone size = 9

Source file "report/results.py" The first line is 2909 |  | Source file "report/results.py" The first line is 2898
with printer.progress_logging(1): for i,germ in enumerate(len1Germs): printer.show_progress(i, len(len1Germs) - 1, prefix='', end='') # printer.log("%d " % (len(len1Germs)+i+1), end='') fig = self.figures.get("whack%sMoleBoxesSummed" % germ[0], verbosity=printer - 1) fig.save_to(_os.path.join( report_dir, D, "whack%sMoleBoxesSummed.png" % germ[0])) whackamoleplots.append( _os.path.join( report_dir, D,"whack%sMoleBoxesSummed.png" % germ[0]) ) |  | with printer.progress_logging(1): for i,germ in enumerate(len1Germs): printer.show_progress(i, len(len1Germs) - 1, prefix='', end='') fig = self.figures.get("whack%sMoleBoxes" % germ[0],verbosity=printer -1) fig.save_to(_os.path.join(report_dir, D,"whack%sMoleBoxes.png" % germ[0])) whackamoleplots.append( _os.path.join( report_dir, D, "whack%sMoleBoxes.png" % germ[0]) )

Clone # 91
Distance between two fragments = 4
Clone size = 8

Source file "report/results.py" The first line is 1085 |  | Source file "report/results.py" The first line is 1083
ret[('best%sGatesetSpamParametersTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetSpamTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetGatesTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetSpamParametersTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetChoiTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetGatesTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetDecompTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetChoiTable') % (gaugeKey)] = _generation.get_blank_table()

Clone # 92
Distance between two fragments = 4
Clone size = 8

Source file "report/results.py" The first line is 1093 |  | Source file "report/results.py" The first line is 1091
ret[('best%sGatesetRotnAxisTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetDecompTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetClosestUnitaryTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetRotnAxisTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetVsTargetTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetClosestUnitaryTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetErrorGenTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetVsTargetTable') % (gaugeKey)] = _generation.get_blank_table()

Clone # 93
Distance between two fragments = 4
Clone size = 8

Source file "report/results.py" The first line is 1087 |  | Source file "report/results.py" The first line is 1083
ret[('best%sGatesetGatesTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetSpamTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetChoiTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetSpamParametersTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetDecompTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetGatesTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetRotnAxisTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetChoiTable') % (gaugeKey)] = _generation.get_blank_table()

Clone # 94
Distance between two fragments = 4
Clone size = 8

Source file "report/results.py" The first line is 1089 |  | Source file "report/results.py" The first line is 1083
ret[('best%sGatesetChoiTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetSpamTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetDecompTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetSpamParametersTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetRotnAxisTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetGatesTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetClosestUnitaryTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetChoiTable') % (gaugeKey)] = _generation.get_blank_table()

Clone # 95
Distance between two fragments = 4
Clone size = 8

Source file "report/results.py" The first line is 1091 |  | Source file "report/results.py" The first line is 1083
ret[('best%sGatesetDecompTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetSpamTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetRotnAxisTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetSpamParametersTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetClosestUnitaryTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetGatesTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetVsTargetTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetChoiTable') % (gaugeKey)] = _generation.get_blank_table()

Clone # 96
Distance between two fragments = 4
Clone size = 8

Source file "report/results.py" The first line is 1093 |  | Source file "report/results.py" The first line is 1083
ret[('best%sGatesetRotnAxisTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetSpamTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetClosestUnitaryTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetSpamParametersTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetVsTargetTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetGatesTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetErrorGenTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetChoiTable') % (gaugeKey)] = _generation.get_blank_table()

Clone # 97
Distance between two fragments = 1
Clone size = 8

Source file "report/results.py" The first line is 2842 |  | Source file "report/results.py" The first line is 2439
fig = self.figures.get(('estimateForLIndex%dColorBoxPlot') % (i), verbosity=(printer) - (1)) |  | fig = self.figures.get(('estimateForLIndex%dColorBoxPlot') % (i), verbosity=(printer) - (1))
fig.save_to(_os.path.join(report_dir, D, ('L%d_%sBoxes.png') % ((i, plotFnName)))) |  | fig.save_to(_os.path.join(report_dir, D, ('L%d_%sBoxes.pdf') % ((i, plotFnName))))
lx = fig.get_extra_info()['nUsedXs'] |  | lx = fig.get_extra_info()['nUsedXs']
ly = fig.get_extra_info()['nUsedYs'] |  | ly = fig.get_extra_info()['nUsedYs']
W = ((float((lx) + (1))) / (float((maxX) + (1)))) * (maxW) |  | W = ((float((lx) + (1))) / (float((maxX) + (1)))) * (maxW)
H = ((float(ly)) / (float(maxY))) * (maxH) |  | H = ((float(ly)) / (float(maxY))) * (maxH)

Clone # 98
Distance between two fragments = 4
Clone size = 8

Source file "report/ppt.py" The first line is 50 |  | Source file "report/latex.py" The first line is 51
d = 0 |  | d = 0
for l in x.shape: if l > 1: d += 1 |  | for l in x.shape: if l > 1: d += 1
x = _np.squeeze(x) |  | x = _np.squeeze(x)
if d == 0: return ppt_value(x, precision=precision, polarprecision=polarprecision) |  | if d == 0: return latex_value(x, precision=precision, polarprecision=polarprecision)
if d == 1: return ppt_vector(x, brackets=brackets, precision=precision, polarprecision=polarprecision) |  | if d == 1: return latex_vector(x, brackets=brackets, precision=precision, polarprecision=polarprecision)
if d == 2: return ppt_matrix(x, brackets=brackets, precision=precision, polarprecision=polarprecision) |  | if d == 2: return latex_matrix(x, brackets=brackets, precision=precision, polarprecision=polarprecision)
raise ValueError(("I don't know how to render a rank %d numpy array as ppt") % (d)) |  | raise ValueError(("I don't know how to render a rank %d numpy array as latex") % (d))

Clone # 99
Distance between two fragments = 4
Clone size = 8

Source file "report/ppt.py" The first line is 50 |  | Source file "report/html.py" The first line is 51
d = 0 |  | d = 0
for l in x.shape: if l > 1: d += 1 |  | for l in x.shape: if l > 1: d += 1
x = _np.squeeze(x) |  | x = _np.squeeze(x)
if d == 0: return ppt_value(x, precision=precision, polarprecision=polarprecision) |  | if d == 0: return html_value(x, precision=precision, polarprecision=polarprecision)
if d == 1: return ppt_vector(x, brackets=brackets, precision=precision, polarprecision=polarprecision) |  | if d == 1: return html_vector(x, brackets=brackets, precision=precision, polarprecision=polarprecision)
if d == 2: return ppt_matrix(x, brackets=brackets, precision=precision, polarprecision=polarprecision) |  | if d == 2: return html_matrix(x, brackets=brackets, precision=precision, polarprecision=polarprecision)
raise ValueError(("I don't know how to render a rank %d numpy array as ppt") % (d)) |  | raise ValueError(("I don't know how to render a rank %d numpy array as html") % (d))

Clone # 100
Distance between two fragments = 4
Clone size = 8

Source file "report/latex.py" The first line is 51 |  | Source file "report/html.py" The first line is 51
d = 0 |  | d = 0
for l in x.shape: if l > 1: d += 1 |  | for l in x.shape: if l > 1: d += 1
x = _np.squeeze(x) |  | x = _np.squeeze(x)
if d == 0: return latex_value(x, precision=precision, polarprecision=polarprecision) |  | if d == 0: return html_value(x, precision=precision, polarprecision=polarprecision)
if d == 1: return latex_vector(x, brackets=brackets, precision=precision, polarprecision=polarprecision) |  | if d == 1: return html_vector(x, brackets=brackets, precision=precision, polarprecision=polarprecision)
if d == 2: return latex_matrix(x, brackets=brackets, precision=precision, polarprecision=polarprecision) |  | if d == 2: return html_matrix(x, brackets=brackets, precision=precision, polarprecision=polarprecision)
raise ValueError(("I don't know how to render a rank %d numpy array as latex") % (d)) |  | raise ValueError(("I don't know how to render a rank %d numpy array as html") % (d))

Clone # 101
Distance between two fragments = 0
Clone size = 8

Source file "report/latex.py" The first line is 202 |  | Source file "report/ppt.py" The first line is 190
if abs(x) < (5) * ((10) ** (-(precision) + (1))): s = ('%.0e') % (x) elif abs(x) < 1: s = ('%.*f') % ((precision, x)) elif abs(x) <= (10) ** (precision): s = ('%.*f') % (((precision) - (int(_np.log10(abs(x)))), x)) else: s = ('%.0e') % (x) |  | if abs(x) < (5) * ((10) ** (-(precision) + (1))): s = ('%.0e') % (x) elif abs(x) < 1: s = ('%.*f') % ((precision, x)) elif abs(x) <= (10) ** (precision): s = ('%.*f') % (((precision) - (int(_np.log10(abs(x)))), x)) else: s = ('%.0e') % (x)
p = s.split('e') |  | p = s.split('e')

Clone # 102
Distance between two fragments = 0
Clone size = 8

Source file "report/html.py" The first line is 211 |  | Source file "report/ppt.py" The first line is 190
if abs(x) < (5) * ((10) ** (-(precision) + (1))): s = ('%.0e') % (x) elif abs(x) < 1: s = ('%.*f') % ((precision, x)) elif abs(x) <= (10) ** (precision): s = ('%.*f') % (((precision) - (int(_np.log10(abs(x)))), x)) else: s = ('%.0e') % (x) |  | if abs(x) < (5) * ((10) ** (-(precision) + (1))): s = ('%.0e') % (x) elif abs(x) < 1: s = ('%.*f') % ((precision, x)) elif abs(x) <= (10) ** (precision): s = ('%.*f') % (((precision) - (int(_np.log10(abs(x)))), x)) else: s = ('%.0e') % (x)
p = s.split('e') |  | p = s.split('e')

Clone # 103
Distance between two fragments = 2
Clone size = 8

Source file "report/results.py" The first line is 1563 |  | Source file "report/results.py" The first line is 2301
qtys['settoggles'] += "\\toggle%s{gaugeoptappendix}\n" % \ ("true" if gaugeOptAppendix else "false") |  | qtys['settoggles'] += "\\toggle%s{debuggingaidsappendix}\n" % \ ("true" if debugAidsAppendix else "false" )
qtys['settoggles'] += "\\toggle%s{pixelplotsappendix}\n" % \ ("true" if pixelPlotAppendix else "false") |  | qtys['settoggles'] += "\\toggle%s{pixelplotsappendix}\n" % \ ("true" if pixelPlotAppendix else "false" )
qtys['settoggles'] += "\\toggle%s{whackamoleappendix}\n" % \ ("true" if whackamoleAppendix else "false") |  | qtys['settoggles'] += "\\toggle%s{whackamoleappendix}\n" % \ ("true" if whackamoleAppendix else "false" )
qtys['confidenceLevel'] = "%g" % \ confidenceLevel if confidenceLevel is not None else "NOT-SET" |  | qtys['confidenceLevel'] = "%g" % confidenceLevel \ if confidenceLevel is not None else "NOT-SET"

Clone # 104
Distance between two fragments = 0
Clone size = 8

Source file "report/generation.py" The first line is 1568 |  | Source file "report/generation.py" The first line is 1462
cri = _objs.ConfidenceRegion(gateset, hessian, confidenceLevel, hessianProjection, nonMarkRadiusSq=nonMarkRadiusSq) |  | cri = _objs.ConfidenceRegion(gateset, hessian, confidenceLevel, hessianProjection, nonMarkRadiusSq=nonMarkRadiusSq)
Np_check = gateset.num_nongauge_params() |  | Np_check = gateset.num_nongauge_params()
if Np_check != cri.nNonGaugeParams: _warnings.warn(('Number of non-gauge parameters in gateset and confidence region do ') + (' not match. This indicates an internal logic error.')) |  | if Np_check != cri.nNonGaugeParams: _warnings.warn(('Number of non-gauge parameters in gateset and confidence region do ') + (' not match. This indicates an internal logic error.'))
return cri |  | return cri

Clone # 105
Distance between two fragments = 3
Clone size = 7

Source file "report/results.py" The first line is 1156 |  | Source file "report/results.py" The first line is 1147
mpc = self.parameters['minProbClip'] |  | mpc = self.parameters['minProbClipForWeighting']
return _plotting.direct_mlgst_gatesets(baseStrs, self.dataset, direct_specs, gsTarget, svdTruncateTo=gsTarget.get_dimension(), minProbClip=mpc, probClipInterval=self.parameters['probClipInterval'], verbosity=0) |  | return _plotting.direct_mc2gst_gatesets(baseStrs, self.dataset, direct_specs, gsTarget, svdTruncateTo=gsTarget.get_dimension(), minProbClipForWeighting=mpc, probClipInterval=self.parameters['probClipInterval'], verbosity=0)

Clone # 106
Distance between two fragments = 3
Clone size = 7

Source file "report/results.py" The first line is 543 |  | Source file "report/results.py" The first line is 536
fns['bestGatesetErrorGenTable'] = (fn, validate_essential) |  | fns['bestGatesetSpamVsTargetTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gates_vs_target_angles_table(gsBest, gsTgt, cri) |  | def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gates_vs_target_err_gen_table(gsBest, gsTgt, cri)
fns['bestGatesetVsTargetAnglesTable'] = (fn, validate_essential) |  | fns['bestGatesetErrorGenTable'] = (fn, validate_essential)

Clone # 107
Distance between two fragments = 4
Clone size = 7

Source file "report/results.py" The first line is 441 |  | Source file "report/results.py" The first line is 448
fns['fiducialListTable'] = (fn, validate_LsAndGerms) |  | fns['prepStrListTable'] = (fn, validate_LsAndGerms)
def fn(key, confidenceLevel, vb): setup() return _generation.get_gatestring_table(self.gatestring_lists['prep fiducials'], 'Preparation Fiducial') |  | def fn(key, confidenceLevel, vb): setup() return _generation.get_gatestring_table(self.gatestring_lists['effect fiducials'], 'Measurement Fiducial')
fns['prepStrListTable'] = (fn, validate_LsAndGerms) |  | fns['effectStrListTable'] = (fn, validate_LsAndGerms)

Clone # 108
Distance between two fragments = 1
Clone size = 7

Source file "report/results.py" The first line is 2246 |  | Source file "report/results.py" The first line is 2669
printer = VerbosityPrinter.build_printer(verbosity) |  | printer = VerbosityPrinter.build_printer(verbosity)
assert self._bEssentialResultsSet |  | assert self._bEssentialResultsSet
self.confidence_level = confidenceLevel |  | self.confidence_level = confidenceLevel
self._comm = comm |  | self._comm = comm
v = verbosity |  | v = verbosity
def tooltiptex(directive): return '' |  | def tooltiptext(directive): return ''

Clone # 109
Distance between two fragments = 3
Clone size = 7

Source file "report/html.py" The first line is 172 |  | Source file "report/html.py" The first line is 129
if brackets: return (((('
| ') + (' ' )) + ('\n'.join(lines))) + ('
')) + (' |

\n')
else:
return (((('

') + (' ' )) + ('\n'.join(lines))) + ('

')) + ('
\n') if brackets:
return (((('

| ') + ('
'
)) + ('
'.join(lines))) + ('

')) + (' \n')
else:
return (((('

') + ('
'
)) + ('
'.join(lines))) + ('

')) + ('
\n')

Clone # 110
Distance between two fragments = 0
Clone size = 7

Source file "report/results.py" The first line is 1855 |  | Source file "report/results.py" The first line is 3727
qtys['whackamole_plot_figures'] = whackamoleplots |  | qtys['whackamole_plot_figures'] = whackamoleplots
if bWasInteractive: _matplotlib.pyplot.ion() |  | if bWasInteractive: _matplotlib.pyplot.ion()
printer.log('*** Merging into template file ***') |  | printer.log('*** Merging into template file ***')
mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex')) |  | mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex'))
appendicesTexFilename = _os.path.join(report_dir, (report_base) + ('_appendices.tex')) |  | appendicesTexFilename = _os.path.join(report_dir, (report_base) + ('_appendices.tex'))
pdfFilename = _os.path.join(report_dir, (report_base) + ('.pdf')) |  | pdfFilename = _os.path.join(report_dir, (report_base) + ('.pdf'))

Clone # 111
Distance between two fragments = 3
Clone size = 7

Source file "report/results.py" The first line is 2026 |  | Source file "report/results.py" The first line is 2294
qtys = {} |  | qtys = {}
qtys['title'] = title |  | qtys['title'] = title
qtys['datasetLabel'] = datasetLabel |  | qtys['datasetLabel'] = datasetLabel
qtys['settoggles'] = "\\toggle%s{confidences}\n" % \ ("false" if confidenceLevel is None else "true") |  | qtys['settoggles'] = "\\toggle%s{confidences}\n" % \ ("false" if confidenceLevel is None else "true" )
qtys['settoggles'] += "\\toggle%s{goodnessSection}\n" % \ ("true" if goodnessOfFitSection else "false") |  | qtys['settoggles'] += "\\toggle%s{LsAndGermsSet}\n" % \ ("true" if self._LsAndGermInfoSet else "false" )

Clone # 112
Distance between two fragments = 3
Clone size = 7

Source file "report/results.py" The first line is 2026 |  | Source file "report/results.py" The first line is 1553
qtys = {} |  | qtys = {}
qtys['title'] = title |  | qtys['title'] = title
qtys['datasetLabel'] = datasetLabel |  | qtys['datasetLabel'] = datasetLabel
qtys['settoggles'] = "\\toggle%s{confidences}\n" % \ ("false" if confidenceLevel is None else "true") |  | qtys['settoggles'] = "\\toggle%s{confidences}\n" % \ ("false" if confidenceLevel is None else "true")
qtys['settoggles'] += "\\toggle%s{goodnessSection}\n" % \ ("true" if goodnessOfFitSection else "false") |  | qtys['settoggles'] += "\\toggle%s{LsAndGermsSet}\n" % \ ("true" if self._LsAndGermInfoSet else "false")

Clone # 113
Distance between two fragments = 4
Clone size = 7

Source file "report/results.py" The first line is 296 |  | Source file "report/results.py" The first line is 280
s += '\n' |  | s += ' .dataset -- the DataSet used to generate these results\n\n'
s += ' .parameters -- a dict of simulation parameters:\n' |  | s += ' .gatesets -- a dictionary of GateSet objects w/keys:\n'
s += ' ---------------------------------------------------------\n' |  | s += ' ---------------------------------------------------------\n'
s += ((' ') + ('\n '.join(list(self.parameters.keys())))) + ('\n') |  | s += ((' ') + ('\n '.join(list(self.gatesets.keys())))) + ('\n')
s += '\n' |  | s += '\n'
s += ' .options -- a container of display options:\n' |  | s += ' .gatestring_lists -- a dict of GateString lists w/keys:\n'
s += ' ---------------------------------------------------------\n' |  | s += ' ---------------------------------------------------------\n'

Clone # 114
Distance between two fragments = 4
Clone size = 7

Source file "report/reportables.py" The first line is 98 |  | Source file "report/reportables.py" The first line is 82
if gateset.frobeniusdist(confidenceRegionInfo.get_gateset()) > 1e-06: raise ValueError(('Gate quantity confidence region is being requested for ') + ('a different gateset than the given confidenceRegionInfo')) |  | if gateset.frobeniusdist(confidenceRegionInfo.get_gateset()) > 1e-06: raise ValueError(('Prep quantity confidence region is being requested for ') + ('a different gateset than the given confidenceRegionInfo'))
df, f0 = confidenceRegionInfo.get_prep_fn_confidence_interval(fnOfPrep, prepLabel, eps, returnFnVal=True, verbosity=verbosity) |  | df, f0 = confidenceRegionInfo.get_gate_fn_confidence_interval(fnOfGate, gateLabel, eps, returnFnVal=True, verbosity=verbosity)
return ReportableQty(f0, df) |  | return ReportableQty(f0, df)

Clone # 115
Distance between two fragments = 0
Clone size = 7

Source file "report/results.py" The first line is 2812 |  | Source file "report/results.py" The first line is 3508
if self.parameters['objective'] == 'chi2': plotFnName, plotFnLatex = ('Chi2', '$\\chi^2$') elif self.parameters['objective'] == 'logl': plotFnName, plotFnLatex = ('LogL', '$\\log(\\mathcal{L})$') else: raise ValueError(('Invalid objective value: %s') % (self.parameters['objective'])) |  | if self.parameters['objective'] == 'chi2': plotFnName, plotFnLatex = ('Chi2', '$\\chi^2$') elif self.parameters['objective'] == 'logl': plotFnName, plotFnLatex = ('LogL', '$\\log(\\mathcal{L})$') else: raise ValueError(('Invalid objective value: %s') % (self.parameters['objective']))
printer.log((' -- %s plots (%d): ') % ((plotFnName, nPlots)), end='') |  | printer.log((' -- %s plots (%d): ') % ((plotFnName, nPlots)), end='')

Clone # 116
Distance between two fragments = 0
Clone size = 7

Source file "report/results.py" The first line is 2409 |  | Source file "report/results.py" The first line is 3508
if self.parameters['objective'] == 'chi2': plotFnName, plotFnLatex = ('Chi2', '$\\chi^2$') elif self.parameters['objective'] == 'logl': plotFnName, plotFnLatex = ('LogL', '$\\log(\\mathcal{L})$') else: raise ValueError(('Invalid objective value: %s') % (self.parameters['objective'])) |  | if self.parameters['objective'] == 'chi2': plotFnName, plotFnLatex = ('Chi2', '$\\chi^2$') elif self.parameters['objective'] == 'logl': plotFnName, plotFnLatex = ('LogL', '$\\log(\\mathcal{L})$') else: raise ValueError(('Invalid objective value: %s') % (self.parameters['objective']))
printer.log((' -- %s plots (%d): ') % ((plotFnName, nPlots)), end='') |  | printer.log((' -- %s plots (%d): ') % ((plotFnName, nPlots)), end='')

Clone # 117
Distance between two fragments = 3
Clone size = 7

Source file "report/generation.py" The first line is 485 |  | Source file "report/generation.py" The first line is 407
for gl in gateLabels: if confidenceRegionInfo is None: rowData = ([gl]) + ([(qtys[('%s %s') % ((gl, qty))].get_value(), None) for qty in qtyNames ]) else: rowData = ([gl]) + ([qtys[('%s %s') % ((gl, qty))].get_value_and_err_bar() for qty in qtyNames ]) table.addrow(rowData, formatters) |  | for l in effectLabels: if confidenceRegionInfo is None: rowData = ([l]) + ([(qtys[('%s effect %s') % ((l, qty))].get_value(), None) for qty in qtyNames ]) else: rowData = ([l]) + ([qtys[('%s effect %s') % ((l, qty))].get_value_and_err_bar() for qty in qtyNames ]) table.addrow(rowData, formatters)
table.finish() |  | table.finish()
return table |  | return table

Clone # 118
Distance between two fragments = 3
Clone size = 7

Source file "report/generation.py" The first line is 407 |  | Source file "report/generation.py" The first line is 352
for l in effectLabels: if confidenceRegionInfo is None: rowData = ([l]) + ([(qtys[('%s effect %s') % ((l, qty))].get_value(), None) for qty in qtyNames ]) else: rowData = ([l]) + ([qtys[('%s effect %s') % ((l, qty))].get_value_and_err_bar() for qty in qtyNames ]) table.addrow(rowData, formatters) |  | for gl in gateLabels: if confidenceRegionInfo is None: rowData = ([gl]) + ([(qtys[('%s %s') % ((gl, qty))].get_value(), None) for qty in qtyNames ]) else: rowData = ([gl]) + ([qtys[('%s %s') % ((gl, qty))].get_value_and_err_bar() for qty in qtyNames ]) table.addrow(rowData, formatters)
table.finish() |  | table.finish()
return table |  | return table

Clone # 119
Distance between two fragments = 0
Clone size = 9

Source file "report/results.py" The first line is 3351 |  | Source file "report/results.py" The first line is 2734
if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET' |  | if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET'

Clone # 120
Distance between two fragments = 0
Clone size = 9

Source file "report/results.py" The first line is 1573 |  | Source file "report/results.py" The first line is 2734
if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET' |  | if confidenceLevel is not None: cri = self._get_confidence_region(confidenceLevel) qtys['confidenceIntervalScaleFctr'] = ('%.3g') % (cri.intervalScaling) qtys['confidenceIntervalNumNonGaugeParams'] = ('%d') % (cri.nNonGaugeParams) else: cri = None qtys['confidenceIntervalScaleFctr'] = 'NOT-SET' qtys['confidenceIntervalNumNonGaugeParams'] = 'NOT-SET'

Clone # 121
Distance between two fragments = 2
Clone size = 7

Source file "report/results.py" The first line is 1837 |  | Source file "report/results.py" The first line is 1819
printer.show_progress(i, (len(len1Germs)) - (1), prefix='', end='') |  | printer.show_progress(i, (len(len1Germs)) - (1), prefix='', end='')
fig = self.figures.get(('whack%sMoleBoxesSummed') % (germ[0]), verbosity=(printer) - (1)) |  | fig = self.figures.get(('whack%sMoleBoxes') % (germ[0]), verbosity=(printer) - (1))
fig.save_to(_os.path.join(report_dir, D, ('whack%sMoleBoxesSummed.pdf') % (germ[0]))) |  | fig.save_to(_os.path.join(report_dir, D, ('whack%sMoleBoxes.pdf') % (germ[0])))
whackamoleplots += '\n' |  | whackamoleplots += '\n'
whackamoleplots += '\\begin{figure}\n' |  | whackamoleplots += '\\begin{figure}\n'
whackamoleplots += '\\begin{center}\n' |  | whackamoleplots += '\\begin{center}\n'

Clone # 122
Distance between two fragments = 0
Clone size = 7

Source file "report/results.py" The first line is 3326 |  | Source file "report/results.py" The first line is 2719
if not self._LsAndGermInfoSet: debugAidsAppendix = False pixelPlotAppendix = False whackamoleAppendix = False |  | if not self._LsAndGermInfoSet: debugAidsAppendix = False pixelPlotAppendix = False whackamoleAppendix = False
qtys = {} |  | qtys = {}
qtys['title'] = title |  | qtys['title'] = title
qtys['datasetLabel'] = datasetLabel |  | qtys['datasetLabel'] = datasetLabel

Clone # 123
Distance between two fragments = 0
Clone size = 7

Source file "report/results.py" The first line is 1548 |  | Source file "report/results.py" The first line is 2719
if not self._LsAndGermInfoSet: debugAidsAppendix = False pixelPlotAppendix = False whackamoleAppendix = False |  | if not self._LsAndGermInfoSet: debugAidsAppendix = False pixelPlotAppendix = False whackamoleAppendix = False
qtys = {} |  | qtys = {}
qtys['title'] = title |  | qtys['title'] = title
qtys['datasetLabel'] = datasetLabel |  | qtys['datasetLabel'] = datasetLabel

Clone # 124
Distance between two fragments = 2
Clone size = 7

Source file "report/results.py" The first line is 146 |  | Source file "report/results.py" The first line is 243
self.dataset = dataset |  | self.dataset = dataset
self.parameters['objective'] = objective |  | self.parameters['objective'] = objective
self.parameters['constrainToTP'] = constrainToTP |  | self.parameters['constrainToTP'] = constrainToTP
if gatesetEstimate_noGaugeOpt is not None: self.gatesets['iteration estimates pre gauge opt'] = [gatesetEstimate_noGaugeOpt] |  | if gatesetsByL_noGaugeOpt is not None: self.gatesets['iteration estimates pre gauge opt'] = gatesetsByL_noGaugeOpt
self._bEssentialResultsSet = True |  | self._bEssentialResultsSet = True

Clone # 125
Distance between two fragments = 0
Clone size = 6

Source file "report/plotting.py" The first line is 3640 |  | Source file "report/plotting.py" The first line is 3440
rptFig = _ReportFigure(axes) |  | rptFig = _ReportFigure(axes)
if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig) |  | if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig)
return rptFig |  | return rptFig

Clone # 126
Distance between two fragments = 2
Clone size = 6

Source file "report/results.py" The first line is 1665 |  | Source file "report/results.py" The first line is 2378
printer.log('*** Generating plots ***') |  | printer.log('*** Generating plots ***')
if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False |  | if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False
maxW, maxH = (6.5, 9.0) |  | maxW, maxH = (4.0, 3.0)

Clone # 127
Distance between two fragments = 1
Clone size = 6

Source file "report/results.py" The first line is 3457 |  | Source file "report/results.py" The first line is 2796
def set_fig_qtys(figkey, figFilenm, v, W=None, H=None): fig = self.figures.get(figkey, verbosity=v) fig.save_to(_os.path.join(report_dir, D, figFilenm)) qtys[figkey] = incgr(figFilenm, W, H) qtys[('tt_') + (figkey)] = tooltiptex((".figures['%s']") % (figkey)) return fig |  | def set_fig_qtys(figkey, figFilenm, v, W=None, H=None): fig = self.figures.get(figkey, verbosity=v) fig.save_to(_os.path.join(report_dir, D, figFilenm)) qtys[figkey] = incgr(figFilenm, W, H) qtys[('tt_') + (figkey)] = tooltiptext((".figures['%s']") % (figkey)) return fig

Clone # 128
Distance between two fragments = 1
Clone size = 6

Source file "report/results.py" The first line is 2796 |  | Source file "report/results.py" The first line is 1680
def set_fig_qtys(figkey, figFilenm, v, W=None, H=None): fig = self.figures.get(figkey, verbosity=v) fig.save_to(_os.path.join(report_dir, D, figFilenm)) qtys[figkey] = incgr(figFilenm, W, H) qtys[('tt_') + (figkey)] = tooltiptext((".figures['%s']") % (figkey)) return fig |  | def set_fig_qtys(figkey, figFilenm, v, W=None, H=None): fig = self.figures.get(figkey, verbosity=v) fig.save_to(_os.path.join(report_dir, D, figFilenm)) qtys[figkey] = incgr(figFilenm, W, H) qtys[('tt_') + (figkey)] = tooltiptex((".figures['%s']") % (figkey)) return fig

Clone # 129
Distance between two fragments = 3
Clone size = 6

Source file "report/plotting.py" The first line is 526 |  | Source file "report/plotting.py" The first line is 491
prev_cmap = cmaps[-2] |  | cmap = cmaps[0]
N = cmap.N |  | N = cmap.N
low_val, high_val = ranges[-1] |  | low_val, high_val = ranges[0]
input_values = _np.linspace(0.0, 1.0, N) |  | input_values = _np.linspace(0.0, 1.0, N)
scaled_values = _np.linspace(low_val, high_val, N) |  | scaled_values = _np.linspace(low_val, high_val, N)
colors = cmap(input_values) |  | colors = cmap(input_values)

Clone # 130
Distance between two fragments = 4
Clone size = 6

Source file "report/results.py" The first line is 604 |  | Source file "report/results.py" The first line is 598
fns['bestGatesetErrGenBoxTable'] = (fn, validate_essential) |  | fns['targetGatesBoxTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() return _generation.get_gateset_eigenval_table(gsBest, gsTgt, 'bestEvalPolarPlt') |  | def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() return _generation.get_gates_vs_target_err_gen_boxes_table(gsBest, gsTgt, 'bestErrgenBoxes')
fns['bestGatesetEvalTable'] = (fn, validate_essential) |  | fns['bestGatesetErrGenBoxTable'] = (fn, validate_essential)

Clone # 131
Distance between two fragments = 4
Clone size = 6

Source file "report/results.py" The first line is 610 |  | Source file "report/results.py" The first line is 598
fns['bestGatesetEvalTable'] = (fn, validate_essential) |  | fns['targetGatesBoxTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() return _generation.get_gateset_relative_eigenval_table(gsBest, gsTgt, 'bestRelEvalPolarPlt') |  | def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() return _generation.get_gates_vs_target_err_gen_boxes_table(gsBest, gsTgt, 'bestErrgenBoxes')
fns['bestGatesetRelEvalTable'] = (fn, validate_essential) |  | fns['bestGatesetErrGenBoxTable'] = (fn, validate_essential)

Clone # 132
Distance between two fragments = 3
Clone size = 6

Source file "report/results.py" The first line is 494 |  | Source file "report/results.py" The first line is 500
fns['bestGatesetGatesTable'] = (fn, validate_essential) |  | fns['bestGatesetChoiTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_choi_table(gsBest, cri) |  | def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_decomp_table(gsBest, cri)
fns['bestGatesetChoiTable'] = (fn, validate_essential) |  | fns['bestGatesetDecompTable'] = (fn, validate_essential)

Clone # 133
Distance between two fragments = 4
Clone size = 6

Source file "report/results.py" The first line is 468 |  | Source file "report/results.py" The first line is 482
fns['germList2ColTable'] = (fn, validate_LsAndGerms) |  | fns['bestGatesetSpamBriefTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_spam_table(gsBest, cri) |  | def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_spam_parameters_table(gsBest, cri)
fns['bestGatesetSpamTable'] = (fn, validate_essential) |  | fns['bestGatesetSpamParametersTable'] = (fn, validate_essential)

Clone # 134
Distance between two fragments = 4
Clone size = 6

Source file "report/results.py" The first line is 468 |  | Source file "report/results.py" The first line is 488
fns['germList2ColTable'] = (fn, validate_LsAndGerms) |  | fns['bestGatesetSpamParametersTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_spam_table(gsBest, cri) |  | def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_gates_table(gsBest, cri)
fns['bestGatesetSpamTable'] = (fn, validate_essential) |  | fns['bestGatesetGatesTable'] = (fn, validate_essential)

Clone # 135
Distance between two fragments = 3
Clone size = 6

Source file "report/results.py" The first line is 482 |  | Source file "report/results.py" The first line is 500
fns['bestGatesetSpamBriefTable'] = (fn, validate_essential) |  | fns['bestGatesetChoiTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_spam_parameters_table(gsBest, cri) |  | def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_decomp_table(gsBest, cri)
fns['bestGatesetSpamParametersTable'] = (fn, validate_essential) |  | fns['bestGatesetDecompTable'] = (fn, validate_essential)

Clone # 136
Distance between two fragments = 3
Clone size = 7

Source file "report/results.py" The first line is 543 |  | Source file "report/results.py" The first line is 512
fns['bestGatesetErrorGenTable'] = (fn, validate_essential) |  | fns['bestGatesetRotnAxisTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gates_vs_target_angles_table(gsBest, gsTgt, cri) |  | def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_eigenval_table(gsBest, gsTgt, cri)
fns['bestGatesetVsTargetAnglesTable'] = (fn, validate_essential) |  | fns['bestGatesetEvalTable'] = (fn, validate_essential)

Clone # 137
Distance between two fragments = 4
Clone size = 6

Source file "report/results.py" The first line is 468 |  | Source file "report/results.py" The first line is 494
fns['germList2ColTable'] = (fn, validate_LsAndGerms) |  | fns['bestGatesetGatesTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_spam_table(gsBest, cri) |  | def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_choi_table(gsBest, cri)
fns['bestGatesetSpamTable'] = (fn, validate_essential) |  | fns['bestGatesetChoiTable'] = (fn, validate_essential)

Clone # 138
Distance between two fragments = 3
Clone size = 7

Source file "report/results.py" The first line is 536 |  | Source file "report/results.py" The first line is 512
fns['bestGatesetSpamVsTargetTable'] = (fn, validate_essential) |  | fns['bestGatesetRotnAxisTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gates_vs_target_err_gen_table(gsBest, gsTgt, cri) |  | def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_eigenval_table(gsBest, gsTgt, cri)
fns['bestGatesetErrorGenTable'] = (fn, validate_essential) |  | fns['bestGatesetEvalTable'] = (fn, validate_essential)

Clone # 139
Distance between two fragments = 4
Clone size = 6

Source file "report/results.py" The first line is 468 |  | Source file "report/results.py" The first line is 500
fns['germList2ColTable'] = (fn, validate_LsAndGerms) |  | fns['bestGatesetChoiTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_spam_table(gsBest, cri) |  | def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_decomp_table(gsBest, cri)
fns['bestGatesetSpamTable'] = (fn, validate_essential) |  | fns['bestGatesetDecompTable'] = (fn, validate_essential)

Clone # 140
Distance between two fragments = 3
Clone size = 6

Source file "report/results.py" The first line is 530 |  | Source file "report/results.py" The first line is 512
fns['bestGatesetVsTargetTable'] = (fn, validate_essential) |  | fns['bestGatesetRotnAxisTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_spam_vs_target_table(gsBest, gsTgt, cri) |  | def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_eigenval_table(gsBest, gsTgt, cri)
fns['bestGatesetSpamVsTargetTable'] = (fn, validate_essential) |  | fns['bestGatesetEvalTable'] = (fn, validate_essential)

Clone # 141
Distance between two fragments = 3
Clone size = 7

Source file "report/results.py" The first line is 543 |  | Source file "report/results.py" The first line is 524
fns['bestGatesetErrorGenTable'] = (fn, validate_essential) |  | fns['bestGatesetClosestUnitaryTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gates_vs_target_angles_table(gsBest, gsTgt, cri) |  | def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gates_vs_target_table(gsBest, gsTgt, cri)
fns['bestGatesetVsTargetAnglesTable'] = (fn, validate_essential) |  | fns['bestGatesetVsTargetTable'] = (fn, validate_essential)

Clone # 142
Distance between two fragments = 3
Clone size = 6

Source file "report/results.py" The first line is 524 |  | Source file "report/results.py" The first line is 512
fns['bestGatesetClosestUnitaryTable'] = (fn, validate_essential) |  | fns['bestGatesetRotnAxisTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gates_vs_target_table(gsBest, gsTgt, cri) |  | def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_eigenval_table(gsBest, gsTgt, cri)
fns['bestGatesetVsTargetTable'] = (fn, validate_essential) |  | fns['bestGatesetEvalTable'] = (fn, validate_essential)

Clone # 143
Distance between two fragments = 4
Clone size = 7

Source file "report/results.py" The first line is 441 |  | Source file "report/results.py" The first line is 455
fns['fiducialListTable'] = (fn, validate_LsAndGerms) |  | fns['effectStrListTable'] = (fn, validate_LsAndGerms)
def fn(key, confidenceLevel, vb): setup() return _generation.get_gatestring_table(self.gatestring_lists['prep fiducials'], 'Preparation Fiducial') |  | def fn(key, confidenceLevel, vb): setup() return _generation.get_gatestring_table(self.gatestring_lists['germs'], 'Germ')
fns['prepStrListTable'] = (fn, validate_LsAndGerms) |  | fns['germListTable'] = (fn, validate_LsAndGerms)

Clone # 144
Distance between two fragments = 2
Clone size = 6

Source file "report/plotting.py" The first line is 2755 |  | Source file "report/plotting.py" The first line is 1641
xvals, yvals, subMxs, _, _ = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, True) |  | xvals, yvals, subMxs, _, _ = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, True)
max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ]) |  | max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ])
m = -max_abs if m is None else m |  | m = 0 if m is None else m
M = +max_abs if M is None else M |  | M = max_abs if M is None else M

Clone # 145
Distance between two fragments = 3
Clone size = 6

Source file "report/plotting.py" The first line is 2755 |  | Source file "report/plotting.py" The first line is 2637
xvals, yvals, subMxs, _, _ = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, True) |  | xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp)
max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ]) |  | max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ])
m = -max_abs if m is None else m |  | m = -max_abs if m is None else m
M = +max_abs if M is None else M |  | M = +max_abs if M is None else M

Clone # 146
Distance between two fragments = 3
Clone size = 6

Source file "report/plotting.py" The first line is 2755 |  | Source file "report/plotting.py" The first line is 3118
xvals, yvals, subMxs, _, _ = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, True) |  | xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp)
max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ]) |  | max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ])
m = -max_abs if m is None else m |  | m = -max_abs if m is None else m
M = +max_abs if M is None else M |  | M = +max_abs if M is None else M

Clone # 147
Distance between two fragments = 3
Clone size = 6

Source file "report/plotting.py" The first line is 2755 |  | Source file "report/plotting.py" The first line is 2937
xvals, yvals, subMxs, _, _ = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, True) |  | xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp)
max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ]) |  | max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ])
m = -max_abs if m is None else m |  | m = -max_abs if m is None else m
M = +max_abs if M is None else M |  | M = +max_abs if M is None else M

Clone # 148
Distance between two fragments = 0
Clone size = 6

Source file "report/plotting.py" The first line is 2637 |  | Source file "report/plotting.py" The first line is 3118
xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp) |  | xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp)
max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ]) |  | max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ])
m = -max_abs if m is None else m |  | m = -max_abs if m is None else m
M = +max_abs if M is None else M |  | M = +max_abs if M is None else M

Clone # 149
Distance between two fragments = 0
Clone size = 6

Source file "report/plotting.py" The first line is 2637 |  | Source file "report/plotting.py" The first line is 2937
xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp) |  | xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp)
max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ]) |  | max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ])
m = -max_abs if m is None else m |  | m = -max_abs if m is None else m
M = +max_abs if M is None else M |  | M = +max_abs if M is None else M

Clone # 150
Distance between two fragments = 0
Clone size = 6

Source file "report/plotting.py" The first line is 3640 |  | Source file "report/plotting.py" The first line is 3267
rptFig = _ReportFigure(axes) |  | rptFig = _ReportFigure(axes)
if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig) |  | if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig)
return rptFig |  | return rptFig

Clone # 151
Distance between two fragments = 0
Clone size = 6

Source file "report/plotting.py" The first line is 3640 |  | Source file "report/plotting.py" The first line is 1263
rptFig = _ReportFigure(axes) |  | rptFig = _ReportFigure(axes)
if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig) |  | if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig)
return rptFig |  | return rptFig

Clone # 152
Distance between two fragments = 0
Clone size = 6

Source file "report/plotting.py" The first line is 3640 |  | Source file "report/plotting.py" The first line is 828
rptFig = _ReportFigure(axes) |  | rptFig = _ReportFigure(axes)
if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig) |  | if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig)
return rptFig |  | return rptFig

Clone # 153
Distance between two fragments = 0
Clone size = 6

Source file "report/plotting.py" The first line is 3440 |  | Source file "report/plotting.py" The first line is 3267
rptFig = _ReportFigure(axes) |  | rptFig = _ReportFigure(axes)
if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig) |  | if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig)
return rptFig |  | return rptFig

Clone # 154
Distance between two fragments = 0
Clone size = 6

Source file "report/plotting.py" The first line is 3440 |  | Source file "report/plotting.py" The first line is 1263
rptFig = _ReportFigure(axes) |  | rptFig = _ReportFigure(axes)
if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig) |  | if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig)
return rptFig |  | return rptFig

Clone # 155
Distance between two fragments = 0
Clone size = 6

Source file "report/plotting.py" The first line is 3440 |  | Source file "report/plotting.py" The first line is 828
rptFig = _ReportFigure(axes) |  | rptFig = _ReportFigure(axes)
if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig) |  | if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig)
return rptFig |  | return rptFig

Clone # 156
Distance between two fragments = 0
Clone size = 6

Source file "report/plotting.py" The first line is 3267 |  | Source file "report/plotting.py" The first line is 1263
rptFig = _ReportFigure(axes) |  | rptFig = _ReportFigure(axes)
if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig) |  | if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig)
return rptFig |  | return rptFig

Clone # 157
Distance between two fragments = 0
Clone size = 6

Source file "report/plotting.py" The first line is 3267 |  | Source file "report/plotting.py" The first line is 828
rptFig = _ReportFigure(axes) |  | rptFig = _ReportFigure(axes)
if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig) |  | if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig)
return rptFig |  | return rptFig

Clone # 158
Distance between two fragments = 0
Clone size = 6

Source file "report/plotting.py" The first line is 1263 |  | Source file "report/plotting.py" The first line is 828
rptFig = _ReportFigure(axes) |  | rptFig = _ReportFigure(axes)
if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig) |  | if save_to is not None: if len(save_to) > 0: _plt.savefig(save_to, bbox_extra_artists=(axes), bbox_inches='tight') if fig is not None: _plt.close(fig)
return rptFig |  | return rptFig

Clone # 159
Distance between two fragments = 4
Clone size = 7

Source file "report/plotting.py" The first line is 2081 |  | Source file "report/plotting.py" The first line is 1950
with printer.progress_logging(1): for i,sigma in enumerate(gateStrings): printer.show_progress(i, len(gateStrings) - 1, prefix="--- Computing gateset for string ", suffix="---") directMLEGSTgatesets[sigma] = direct_mlgst_gateset( sigma, "GsigmaLbl", dataset, specs, targetGateset, svdTruncateTo, minProbClip, probClipInterval, verbosity) |  | with printer.progress_logging(1): for i,sigma in enumerate(gateStrings): printer.show_progress(i, len(gateStrings) - 1, prefix="--- Computing gateset for string-", suffix='---') directLSGSTgatesets[sigma] = direct_mc2gst_gateset( sigma, "GsigmaLbl", dataset, specs, targetGateset, svdTruncateTo, minProbClipForWeighting, probClipInterval, verbosity)
return directMLEGSTgatesets |  | return directLSGSTgatesets

Clone # 160
Distance between two fragments = 4
Clone size = 6

Source file "report/reportables.py" The first line is 734 |  | Source file "report/reportables.py" The first line is 741
key = ('%s Frobenius diff') % (gateLabel) |  | key = ('%s Jamiolkowski trace dist') % (gateLabel)
possible_qtys.append(key) |  | possible_qtys.append(key)
if key in qtynames: def fro_diff(gate): return _tools.frobeniusdist(gate, gateset2.gates[gateLabel]) ret[key] = _getGateQuantity(fro_diff, gateset1, gateLabel, eps, confidenceRegionInfo) |  | if key in qtynames: def jt_diff(gate): return _tools.jtracedist(gate, gateset2.gates[gateLabel]) ret[key] = _getGateQuantity(jt_diff, gateset1, gateLabel, eps, confidenceRegionInfo)
key = ('%s Jamiolkowski trace dist') % (gateLabel) |  | key = ('%s diamond norm') % (gateLabel)
possible_qtys.append(key) |  | possible_qtys.append(key)

Clone # 161
Distance between two fragments = 3
Clone size = 6

Source file "report/results.py" The first line is 3727 |  | Source file "report/results.py" The first line is 2549
qtys['whackamole_plot_figures'] = whackamoleplots |  | qtys['whackamole_plot_slides'] = whackamoleplots
if bWasInteractive: _matplotlib.pyplot.ion() |  | if bWasInteractive: _matplotlib.pyplot.ion()
printer.log('*** Merging into template file ***') |  | printer.log('*** Merging into template file ***')
mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex')) |  | mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex'))
appendicesTexFilename = _os.path.join(report_dir, (report_base) + ('_appendices.tex')) |  | pdfFilename = _os.path.join(report_dir, (report_base) + ('.pdf'))

Clone # 162
Distance between two fragments = 3
Clone size = 6

Source file "report/results.py" The first line is 1855 |  | Source file "report/results.py" The first line is 2549
qtys['whackamole_plot_figures'] = whackamoleplots |  | qtys['whackamole_plot_slides'] = whackamoleplots
if bWasInteractive: _matplotlib.pyplot.ion() |  | if bWasInteractive: _matplotlib.pyplot.ion()
printer.log('*** Merging into template file ***') |  | printer.log('*** Merging into template file ***')
mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex')) |  | mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex'))
appendicesTexFilename = _os.path.join(report_dir, (report_base) + ('_appendices.tex')) |  | pdfFilename = _os.path.join(report_dir, (report_base) + ('.pdf'))

Clone # 163
Distance between two fragments = 4
Clone size = 6

Source file "report/results.py" The first line is 304 |  | Source file "report/table.py" The first line is 188
s += '\n' |  | s += '\n'
s += "NOTE: passing 'tips=True' to create_full_report_pdf or\n" |  | s += 'Access row and column data by indexing into this object\n'
s += ' create_brief_report_pdf will add markup to the resulting\n' |  | s += ' as a dictionary using the column header followed by the\n'
s += ' PDF indicating how tables and figures in the PDF correspond\n' |  | s += ' value of the first element of each row, i.e.,\n'
s += ' to the values of .tables[ ] and .figures[ ] listed above.\n' |  | s += ' tableObj[][].\n'
return s |  | return s

Clone # 164
Distance between two fragments = 3
Clone size = 7

Source file "report/reportables.py" The first line is 148 |  | Source file "report/reportables.py" The first line is 131
if gateset.frobeniusdist(confidenceRegionInfo.get_gateset()) > 1e-06: raise ValueError(('Spam quantity confidence region is being requested for ') + ('a different gateset than the given confidenceRegionInfo')) |  | if gateset.frobeniusdist(confidenceRegionInfo.get_gateset()) > 1e-06: raise ValueError(('GateSet quantity confidence region is being requested for ') + ('a different gateset than the given confidenceRegionInfo'))
df, f0 = confidenceRegionInfo.get_spam_fn_confidence_interval(fnOfSpamVecs, eps, returnFnVal=True, verbosity=verbosity) |  | df, f0 = confidenceRegionInfo.get_gateset_fn_confidence_interval(fnOfGateSet, eps, returnFnVal=True, verbosity=verbosity)
return ReportableQty(f0, df) |  | return ReportableQty(f0, df)

Clone # 165
Distance between two fragments = 0
Clone size = 6

Source file "report/plotting.py" The first line is 1229 |  | Source file "report/plotting.py" The first line is 807
if title is not None: axes.set_title(title, fontsize=(ticSize) + (4)) |  | if title is not None: axes.set_title(title, fontsize=(ticSize) + (4))
if xlabel is not None: axes.set_xlabel(xlabel, fontsize=(ticSize) + (4)) |  | if xlabel is not None: axes.set_xlabel(xlabel, fontsize=(ticSize) + (4))
if ylabel is not None: axes.set_ylabel(ylabel, fontsize=(ticSize) + (4)) |  | if ylabel is not None: axes.set_ylabel(ylabel, fontsize=(ticSize) + (4))

Clone # 166
Distance between two fragments = 4
Clone size = 7

Source file "report/reportables.py" The first line is 115 |  | Source file "report/reportables.py" The first line is 98
if gateset.frobeniusdist(confidenceRegionInfo.get_gateset()) > 1e-06: raise ValueError(('Effect quantity confidence region is being requested for ') + ('a different gateset than the given confidenceRegionInfo')) |  | if gateset.frobeniusdist(confidenceRegionInfo.get_gateset()) > 1e-06: raise ValueError(('Gate quantity confidence region is being requested for ') + ('a different gateset than the given confidenceRegionInfo'))
df, f0 = confidenceRegionInfo.get_effect_fn_confidence_interval(fnOfEffect, effectLabel, eps, returnFnVal=True, verbosity=verbosity) |  | df, f0 = confidenceRegionInfo.get_prep_fn_confidence_interval(fnOfPrep, prepLabel, eps, returnFnVal=True, verbosity=verbosity)
return ReportableQty(f0, df) |  | return ReportableQty(f0, df)

Clone # 167
Distance between two fragments = 4
Clone size = 7

Source file "report/reportables.py" The first line is 115 |  | Source file "report/reportables.py" The first line is 82
if gateset.frobeniusdist(confidenceRegionInfo.get_gateset()) > 1e-06: raise ValueError(('Effect quantity confidence region is being requested for ') + ('a different gateset than the given confidenceRegionInfo')) |  | if gateset.frobeniusdist(confidenceRegionInfo.get_gateset()) > 1e-06: raise ValueError(('Prep quantity confidence region is being requested for ') + ('a different gateset than the given confidenceRegionInfo'))
df, f0 = confidenceRegionInfo.get_effect_fn_confidence_interval(fnOfEffect, effectLabel, eps, returnFnVal=True, verbosity=verbosity) |  | df, f0 = confidenceRegionInfo.get_gate_fn_confidence_interval(fnOfGate, gateLabel, eps, returnFnVal=True, verbosity=verbosity)
return ReportableQty(f0, df) |  | return ReportableQty(f0, df)

Clone # 168
Distance between two fragments = 0
Clone size = 6

Source file "report/results.py" The first line is 1857 |  | Source file "report/results.py" The first line is 2141
if bWasInteractive: _matplotlib.pyplot.ion() |  | if bWasInteractive: _matplotlib.pyplot.ion()
printer.log('*** Merging into template file ***') |  | printer.log('*** Merging into template file ***')
mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex')) |  | mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex'))
appendicesTexFilename = _os.path.join(report_dir, (report_base) + ('_appendices.tex')) |  | appendicesTexFilename = _os.path.join(report_dir, (report_base) + ('_appendices.tex'))
pdfFilename = _os.path.join(report_dir, (report_base) + ('.pdf')) |  | pdfFilename = _os.path.join(report_dir, (report_base) + ('.pdf'))

Clone # 169
Distance between two fragments = 0
Clone size = 6

Source file "report/results.py" The first line is 1693 |  | Source file "report/results.py" The first line is 3508
if self.parameters['objective'] == 'chi2': plotFnName, plotFnLatex = ('Chi2', '$\\chi^2$') elif self.parameters['objective'] == 'logl': plotFnName, plotFnLatex = ('LogL', '$\\log(\\mathcal{L})$') else: raise ValueError(('Invalid objective value: %s') % (self.parameters['objective'])) |  | if self.parameters['objective'] == 'chi2': plotFnName, plotFnLatex = ('Chi2', '$\\chi^2$') elif self.parameters['objective'] == 'logl': plotFnName, plotFnLatex = ('LogL', '$\\log(\\mathcal{L})$') else: raise ValueError(('Invalid objective value: %s') % (self.parameters['objective']))

Clone # 170
Distance between two fragments = 0
Clone size = 6

Source file "report/results.py" The first line is 2364 |  | Source file "report/results.py" The first line is 3412
for key in tables_to_compute: qtys[key] = self.tables.get(key, verbosity=(printer) - (1)).render('latex', longtables=self.options.long_tables, scratchDir=D, precision=self.options.precision, polarprecision=self.options.polar_precision) qtys[('tt_') + (key)] = tooltiptex((".tables['%s']") % (key)) |  | for key in tables_to_compute: qtys[key] = self.tables.get(key, verbosity=(printer) - (1)).render('latex', longtables=self.options.long_tables, scratchDir=D, precision=self.options.precision, polarprecision=self.options.polar_precision) qtys[('tt_') + (key)] = tooltiptex((".tables['%s']") % (key))

Clone # 171
Distance between two fragments = 0
Clone size = 6

Source file "report/results.py" The first line is 2085 |  | Source file "report/results.py" The first line is 3412
for key in tables_to_compute: qtys[key] = self.tables.get(key, verbosity=(printer) - (1)).render('latex', longtables=self.options.long_tables, scratchDir=D, precision=self.options.precision, polarprecision=self.options.polar_precision) qtys[('tt_') + (key)] = tooltiptex((".tables['%s']") % (key)) |  | for key in tables_to_compute: qtys[key] = self.tables.get(key, verbosity=(printer) - (1)).render('latex', longtables=self.options.long_tables, scratchDir=D, precision=self.options.precision, polarprecision=self.options.polar_precision) qtys[('tt_') + (key)] = tooltiptex((".tables['%s']") % (key))

Clone # 172
Distance between two fragments = 4
Clone size = 6

Source file "report/reportables.py" The first line is 324 |  | Source file "report/reportables.py" The first line is 328
def decomp_angle(gate): decomp = _tools.decompose_gate_matrix(gate) return decomp.get('pi rotations', 0) |  | def decomp_decay_diag(gate): decomp = _tools.decompose_gate_matrix(gate) return decomp.get('decay of diagonal rotation terms', 0)
def decomp_decay_diag(gate): decomp = _tools.decompose_gate_matrix(gate) return decomp.get('decay of diagonal rotation terms', 0) |  | def decomp_decay_offdiag(gate): decomp = _tools.decompose_gate_matrix(gate) return decomp.get('decay of off diagonal rotation terms', 0)

Clone # 173
Distance between two fragments = 4
Clone size = 6

Source file "report/plotting.py" The first line is 538 |  | Source file "report/plotting.py" The first line is 497
for color, value in zip(colors[1:], scaled_values[1:]): r, g, b, a = color red_list.append((value, r, r)) green_list.append((value, g, g)) blue_list.append((value, b, b)) alpha_list.append((value, a, a)) |  | for color, value in zip(colors[:-1], scaled_values[:-1]): r, g, b, a = color red_list.append((value, r, r)) green_list.append((value, g, g)) blue_list.append((value, b, b)) alpha_list.append((value, a, a))

Clone # 174
Distance between two fragments = 2
Clone size = 6

Source file "report/plotting.py" The first line is 517 |  | Source file "report/plotting.py" The first line is 497
for color, value in zip(colors[1:-1], scaled_values[1:-1]): r, g, b, a = color red_list.append((value, r, r)) green_list.append((value, g, g)) blue_list.append((value, b, b)) alpha_list.append((value, a, a)) |  | for color, value in zip(colors[:-1], scaled_values[:-1]): r, g, b, a = color red_list.append((value, r, r)) green_list.append((value, g, g)) blue_list.append((value, b, b)) alpha_list.append((value, a, a))

Clone # 175
Distance between two fragments = 3
Clone size = 6

Source file "report/results.py" The first line is 1095 |  | Source file "report/results.py" The first line is 1091
ret[('best%sGatesetClosestUnitaryTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetDecompTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetVsTargetTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetRotnAxisTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetErrorGenTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetClosestUnitaryTable') % (gaugeKey)] = _generation.get_blank_table()

Clone # 176
Distance between two fragments = 3
Clone size = 6

Source file "report/results.py" The first line is 1095 |  | Source file "report/results.py" The first line is 1083
ret[('best%sGatesetClosestUnitaryTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetSpamTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetVsTargetTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetSpamParametersTable') % (gaugeKey)] = _generation.get_blank_table()
ret[('best%sGatesetErrorGenTable') % (gaugeKey)] = _generation.get_blank_table() |  | ret[('best%sGatesetGatesTable') % (gaugeKey)] = _generation.get_blank_table()

Clone # 177
Distance between two fragments = 1
Clone size = 6

Source file "report/results.py" The first line is 2528 |  | Source file "report/results.py" The first line is 1837
printer.show_progress(i, (len(len1Germs)) - (1), prefix='', end='') |  | printer.show_progress(i, (len(len1Germs)) - (1), prefix='', end='')
fig = self.figures.get(('whack%sMoleBoxesSummed') % (germ[0]), verbosity=(printer) - (1)) |  | fig = self.figures.get(('whack%sMoleBoxesSummed') % (germ[0]), verbosity=(printer) - (1))
fig.save_to(_os.path.join(report_dir, D, ('whack%sMoleBoxesSummed.pdf') % (germ[0]))) |  | fig.save_to(_os.path.join(report_dir, D, ('whack%sMoleBoxesSummed.pdf') % (germ[0])))
whackamoleplots += '\n' |  | whackamoleplots += '\n'
whackamoleplots += '\\begin{frame}\n' |  | whackamoleplots += '\\begin{figure}\n'

Clone # 178
Distance between two fragments = 3
Clone size = 6

Source file "report/results.py" The first line is 2528 |  | Source file "report/results.py" The first line is 1819
printer.show_progress(i, (len(len1Germs)) - (1), prefix='', end='') |  | printer.show_progress(i, (len(len1Germs)) - (1), prefix='', end='')
fig = self.figures.get(('whack%sMoleBoxesSummed') % (germ[0]), verbosity=(printer) - (1)) |  | fig = self.figures.get(('whack%sMoleBoxes') % (germ[0]), verbosity=(printer) - (1))
fig.save_to(_os.path.join(report_dir, D, ('whack%sMoleBoxesSummed.pdf') % (germ[0]))) |  | fig.save_to(_os.path.join(report_dir, D, ('whack%sMoleBoxes.pdf') % (germ[0])))
whackamoleplots += '\n' |  | whackamoleplots += '\n'
whackamoleplots += '\\begin{frame}\n' |  | whackamoleplots += '\\begin{figure}\n'

Clone # 179
Distance between two fragments = 3
Clone size = 6

Source file "report/results.py" The first line is 2507 |  | Source file "report/results.py" The first line is 1837
printer.show_progress(i, (len(len1Germs)) - (1), prefix='', end='') |  | printer.show_progress(i, (len(len1Germs)) - (1), prefix='', end='')
fig = self.figures.get(('whack%sMoleBoxes') % (germ[0]), verbosity=(printer) - (1)) |  | fig = self.figures.get(('whack%sMoleBoxesSummed') % (germ[0]), verbosity=(printer) - (1))
fig.save_to(_os.path.join(report_dir, D, ('whack%sMoleBoxes.pdf') % (germ[0]))) |  | fig.save_to(_os.path.join(report_dir, D, ('whack%sMoleBoxesSummed.pdf') % (germ[0])))
whackamoleplots += '\n' |  | whackamoleplots += '\n'
whackamoleplots += '\\begin{frame}\n' |  | whackamoleplots += '\\begin{figure}\n'

Clone # 180
Distance between two fragments = 1
Clone size = 6

Source file "report/results.py" The first line is 2507 |  | Source file "report/results.py" The first line is 1819
printer.show_progress(i, (len(len1Germs)) - (1), prefix='', end='') |  | printer.show_progress(i, (len(len1Germs)) - (1), prefix='', end='')
fig = self.figures.get(('whack%sMoleBoxes') % (germ[0]), verbosity=(printer) - (1)) |  | fig = self.figures.get(('whack%sMoleBoxes') % (germ[0]), verbosity=(printer) - (1))
fig.save_to(_os.path.join(report_dir, D, ('whack%sMoleBoxes.pdf') % (germ[0]))) |  | fig.save_to(_os.path.join(report_dir, D, ('whack%sMoleBoxes.pdf') % (germ[0])))
whackamoleplots += '\n' |  | whackamoleplots += '\n'
whackamoleplots += '\\begin{frame}\n' |  | whackamoleplots += '\\begin{figure}\n'

Clone # 181
Distance between two fragments = 0
Clone size = 6

Source file "report/results.py" The first line is 1139 |  | Source file "report/results.py" The first line is 1115
baseStrs = [] |  | baseStrs = []
fullDict = self.parameters['L,germ tuple base string dict'] |  | fullDict = self.parameters['L,germ tuple base string dict']
for L in self.parameters['max length list']: for germ in self.gatestring_lists['germs']: if fullDict[(L, germ)] not in baseStrs: baseStrs.append(fullDict[(L, germ)]) |  | for L in self.parameters['max length list']: for germ in self.gatestring_lists['germs']: if fullDict[(L, germ)] not in baseStrs: baseStrs.append(fullDict[(L, germ)])

Clone # 182
Distance between two fragments = 0
Clone size = 5

Source file "report/results.py" The first line is 2099 |  | Source file "report/results.py" The first line is 2783
printer.log('*** Generating plots ***') |  | printer.log('*** Generating plots ***')
if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False |  | if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False

Clone # 183
Distance between two fragments = 0
Clone size = 5

Source file "report/results.py" The first line is 2099 |  | Source file "report/results.py" The first line is 1665
printer.log('*** Generating plots ***') |  | printer.log('*** Generating plots ***')
if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False |  | if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False

Clone # 184
Distance between two fragments = 0
Clone size = 5

Source file "report/results.py" The first line is 2783 |  | Source file "report/results.py" The first line is 3442
printer.log('*** Generating plots ***') |  | printer.log('*** Generating plots ***')
if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False |  | if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False

Clone # 185
Distance between two fragments = 0
Clone size = 5

Source file "report/results.py" The first line is 2783 |  | Source file "report/results.py" The first line is 2378
printer.log('*** Generating plots ***') |  | printer.log('*** Generating plots ***')
if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False |  | if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False

Clone # 186
Distance between two fragments = 0
Clone size = 5

Source file "report/results.py" The first line is 2783 |  | Source file "report/results.py" The first line is 1665
printer.log('*** Generating plots ***') |  | printer.log('*** Generating plots ***')
if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False |  | if _matplotlib.is_interactive(): _matplotlib.pyplot.ioff() bWasInteractive = True else: bWasInteractive = False

Clone # 187
Distance between two fragments = 4
Clone size = 5

Source file "report/results.py" The first line is 2892 |  | Source file "report/results.py" The first line is 1809
allGateStrings = self.gatestring_lists['all'] |  | highestL = Ls[-1]
hammerWeight = 10.0 |  | hammerWeight = 10.0
len1Germs = [g for g in self.gatestring_lists['germs'] if len(g) == 1] |  | len1Germs = [g for g in self.gatestring_lists['germs'] if len(g) == 1]
printer.log((' -- Whack-a-mole plots (%d): ') % ((2) * (len(len1Germs))), end='') |  | printer.log((' -- Whack-a-mole plots (%d): ') % ((2) * (len(len1Germs))), end='')

Clone # 188
Distance between two fragments = 4
Clone size = 6

Source file "report/results.py" The first line is 2892 |  | Source file "report/results.py" The first line is 2497
highestL = Ls[-1] |  | highestL = self.parameters['max length list'][-1]
allGateStrings = self.gatestring_lists['all'] |  | allGateStrings = self.gatestring_lists['all']
hammerWeight = 10.0 |  | hammerWeight = 10.0
len1Germs = [g for g in self.gatestring_lists['germs'] if len(g) == 1] |  | len1Germs = [g for g in self.gatestring_lists['germs'] if len(g) == 1]
printer.log((' -- Whack-a-mole plots (%d): ') % ((2) * (len(len1Germs))), end='') |  | printer.log((' -- Whack-a-mole plots (%d): ') % ((2) * (len(len1Germs))), end='')

Clone # 189
Distance between two fragments = 4
Clone size = 5

Source file "report/results.py" The first line is 1809 |  | Source file "report/results.py" The first line is 2498
highestL = Ls[-1] |  | allGateStrings = self.gatestring_lists['all']
hammerWeight = 10.0 |  | hammerWeight = 10.0
len1Germs = [g for g in self.gatestring_lists['germs'] if len(g) == 1] |  | len1Germs = [g for g in self.gatestring_lists['germs'] if len(g) == 1]
printer.log((' -- Whack-a-mole plots (%d): ') % ((2) * (len(len1Germs))), end='') |  | printer.log((' -- Whack-a-mole plots (%d): ') % ((2) * (len(len1Germs))), end='')

Clone # 190
Distance between two fragments = 0
Clone size = 5

Source file "report/plotting.py" The first line is 2509 |  | Source file "report/plotting.py" The first line is 1482
xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp) |  | xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp)
stdcmap = StdColormapFactory('linlog', n_boxes=n_boxes, linlg_pcntle=linlg_pcntle, dof=dof) |  | stdcmap = StdColormapFactory('linlog', n_boxes=n_boxes, linlg_pcntle=linlg_pcntle, dof=dof)
return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$') |  | return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$')

Clone # 191
Distance between two fragments = 0
Clone size = 5

Source file "report/plotting.py" The first line is 2509 |  | Source file "report/plotting.py" The first line is 1377
xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp) |  | xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp)
stdcmap = StdColormapFactory('linlog', n_boxes=n_boxes, linlg_pcntle=linlg_pcntle, dof=dof) |  | stdcmap = StdColormapFactory('linlog', n_boxes=n_boxes, linlg_pcntle=linlg_pcntle, dof=dof)
return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$') |  | return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$')

Clone # 192
Distance between two fragments = 0
Clone size = 5

Source file "report/plotting.py" The first line is 2348 |  | Source file "report/plotting.py" The first line is 1482
xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp) |  | xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp)
stdcmap = StdColormapFactory('linlog', n_boxes=n_boxes, linlg_pcntle=linlg_pcntle, dof=dof) |  | stdcmap = StdColormapFactory('linlog', n_boxes=n_boxes, linlg_pcntle=linlg_pcntle, dof=dof)
return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$') |  | return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$')

Clone # 193
Distance between two fragments = 0
Clone size = 5

Source file "report/plotting.py" The first line is 2348 |  | Source file "report/plotting.py" The first line is 1377
xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp) |  | xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp)
stdcmap = StdColormapFactory('linlog', n_boxes=n_boxes, linlg_pcntle=linlg_pcntle, dof=dof) |  | stdcmap = StdColormapFactory('linlog', n_boxes=n_boxes, linlg_pcntle=linlg_pcntle, dof=dof)
return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$') |  | return generate_boxplot(xvals, yvals, xy_gatestring_dict, subMxs, stdcmap, xlabel, ylabel, scale, prec, title, sumUp, boxLabels, histogram, histBins, save_to, ticSize, invert, prepStrs, effectStrs, '$\\rho_i$', '$E_i$')

Clone # 194
Distance between two fragments = 3
Clone size = 5

Source file "report/results.py" The first line is 612 |  | Source file "report/results.py" The first line is 606
def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() return _generation.get_gateset_relative_eigenval_table(gsBest, gsTgt, 'bestRelEvalPolarPlt') |  | def fn(key, confidenceLevel, vb): gsTgt, gsBest = setup() return _generation.get_gateset_eigenval_table(gsBest, gsTgt, 'bestEvalPolarPlt')
fns['bestGatesetRelEvalTable'] = (fn, validate_essential) |  | fns['bestGatesetEvalTable'] = (fn, validate_essential)

Clone # 195
Distance between two fragments = 4
Clone size = 5

Source file "report/results.py" The first line is 590 |  | Source file "report/results.py" The first line is 411
fns['progressTable'] = (fn, validate_LsAndGerms) |  | fns['targetSpamBriefTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, _ = setup() return _generation.get_gateset_gate_boxes_table(gsTgt, 'targetGatesBoxes') |  | def fn(key, confidenceLevel, vb): gsTgt, _ = setup() return _generation.get_unitary_gateset_gates_table(gsTgt, None)

Clone # 196
Distance between two fragments = 4
Clone size = 6

Source file "report/results.py" The first line is 399 |  | Source file "report/results.py" The first line is 411
fns['blankTable'] = (fn, validate_none) |  | fns['targetSpamBriefTable'] = (fn, validate_essential)
def fn(key, confidenceLevel, vb): gsTgt, _ = setup() return _generation.get_gateset_spam_table(gsTgt, None) |  | def fn(key, confidenceLevel, vb): gsTgt, _ = setup() return _generation.get_unitary_gateset_gates_table(gsTgt, None)
fns['targetSpamTable'] = (fn, validate_essential) |  | fns['targetGatesTable'] = (fn, validate_essential)

Clone # 197
Distance between two fragments = 3
Clone size = 5

Source file "report/results.py" The first line is 478 |  | Source file "report/results.py" The first line is 508
def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_spam_table(gsBest, cri, False) |  | def fn(key, confidenceLevel, vb): _, gsBest = setup() cri = self._get_confidence_region(confidenceLevel) return _generation.get_gateset_rotn_axis_table(gsBest, cri, True)
fns['bestGatesetSpamBriefTable'] = (fn, validate_essential) |  | fns['bestGatesetRotnAxisTable'] = (fn, validate_essential)

Clone # 198
Distance between two fragments = 3
Clone size = 6

Source file "report/results.py" The first line is 450 |  | Source file "report/results.py" The first line is 457
def fn(key, confidenceLevel, vb): setup() return _generation.get_gatestring_table(self.gatestring_lists['effect fiducials'], 'Measurement Fiducial') |  | def fn(key, confidenceLevel, vb): setup() return _generation.get_gatestring_table(self.gatestring_lists['germs'], 'Germ')
fns['effectStrListTable'] = (fn, validate_LsAndGerms) |  | fns['germListTable'] = (fn, validate_LsAndGerms)

Clone # 199
Distance between two fragments = 4
Clone size = 5

Source file "report/plotting.py" The first line is 1641 |  | Source file "report/plotting.py" The first line is 2637
xvals, yvals, subMxs, _, _ = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, True) |  | xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp)
max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ]) |  | max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ])
m = 0 if m is None else m |  | m = -max_abs if m is None else m

Clone # 200
Distance between two fragments = 4
Clone size = 5

Source file "report/plotting.py" The first line is 1641 |  | Source file "report/plotting.py" The first line is 3118
xvals, yvals, subMxs, _, _ = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, True) |  | xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp)
max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ]) |  | max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ])
m = 0 if m is None else m |  | m = -max_abs if m is None else m

Clone # 201
Distance between two fragments = 4
Clone size = 5

Source file "report/plotting.py" The first line is 1641 |  | Source file "report/plotting.py" The first line is 2937
xvals, yvals, subMxs, _, _ = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, True) |  | xvals, yvals, subMxs, n_boxes, dof = _computeSubMxs(xvals, yvals, xy_gatestring_dict, mx_fn, sumUp)
max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ]) |  | max_abs = max([_np.max(_np.abs(subMxs[iy][ix])) for ix in range(len(xvals)) for iy in range(len(yvals)) ])
m = 0 if m is None else m |  | m = -max_abs if m is None else m

Clone # 202
Distance between two fragments = 0
Clone size = 5

Source file "report/results.py" The first line is 1967 |  | Source file "report/results.py" The first line is 2669
printer = VerbosityPrinter.build_printer(verbosity) |  | printer = VerbosityPrinter.build_printer(verbosity)
assert self._bEssentialResultsSet |  | assert self._bEssentialResultsSet
self.confidence_level = confidenceLevel |  | self.confidence_level = confidenceLevel
self._comm = comm |  | self._comm = comm
v = verbosity |  | v = verbosity

Clone # 203
Distance between two fragments = 0
Clone size = 5

Source file "report/results.py" The first line is 1967 |  | Source file "report/results.py" The first line is 2246
printer = VerbosityPrinter.build_printer(verbosity) |  | printer = VerbosityPrinter.build_printer(verbosity)
assert self._bEssentialResultsSet |  | assert self._bEssentialResultsSet
self.confidence_level = confidenceLevel |  | self.confidence_level = confidenceLevel
self._comm = comm |  | self._comm = comm
v = verbosity |  | v = verbosity

Clone # 204
Distance between two fragments = 4
Clone size = 5

Source file "report/plotting.py" The first line is 3426 |  | Source file "report/plotting.py" The first line is 3417
r = _np.absolute(rel_evals10) |  | r = _np.absolute(target_evals)
theta = _np.angle(rel_evals10) |  | theta = _np.angle(target_evals)
axes.plot(theta, r, linestyle='None', marker='o', color='g', markersize=5) |  | axes.plot(theta, r, linestyle='None', marker='o', color='k', markersize=8)
r = _np.absolute(rel_evals) |  | r = _np.absolute(evals)
theta = _np.angle(rel_evals) |  | theta = _np.angle(evals)

Clone # 205
Distance between two fragments = 2
Clone size = 5

Source file "report/generation.py" The first line is 802 |  | Source file "report/generation.py" The first line is 720
gateLabels = list(gateset.gates.keys()) |  | gateLabels = list(gateset.gates.keys())
colHeadings = ('Gate', 'Relative Evals', 'Polar Plot') |  | colHeadings = ('Gate', 'Eigenvalues', 'Polar Plot')
formatters = ([None]) * (3) |  | formatters = ([None]) * (3)
qtyNames = ('relative eigenvalues') |  | qtyNames = ('eigenvalues')
qtys_to_compute = [('%s %s') % ((gl, qty)) for qty in qtyNames for gl in gateLabels ] |  | qtys_to_compute = [('%s %s') % ((gl, qty)) for qty in qtyNames for gl in gateLabels ]

Clone # 206
Distance between two fragments = 4
Clone size = 5

Source file "report/reportables.py" The first line is 485 |  | Source file "report/reportables.py" The first line is 447
closestU_qtys[('%s closest unitary choi matrix') % (label)] = closeUJMxQty |  | gate_qtys[('%s choi trace') % (label)] = choiTrQty
closestU_qtys[('%s closest unitary decomposition') % (label)] = decompQty |  | gate_qtys[('%s decomposition') % (label)] = decompQty
for qtyname in qtynames: if qtyname in closestU_qtys: ret[qtyname] = closestU_qtys[qtyname] |  | for qtyname in qtynames: if qtyname in gate_qtys: ret[qtyname] = gate_qtys[qtyname]

Clone # 207
Distance between two fragments = 2
Clone size = 5

Source file "report/results.py" The first line is 953 |  | Source file "report/results.py" The first line is 890
noConfidenceLevelDependence(confidenceLevel) |  | noConfidenceLevelDependence(confidenceLevel)
gateLabel = _re.match(expr7, key).group(1) |  | gateLabel = _re.match(expr4, key).group(1)
gate = self.gatesets['final estimate'].gates[gateLabel] |  | gate = self.gatesets['final estimate'].gates[gateLabel]
target_gate = self.gatesets['target'].gates[gateLabel] |  | targetGate = self.gatesets['target'].gates[gateLabel]
basisNm = self.gatesets['final estimate'].get_basis_name() |  | basisNm = self.gatesets['final estimate'].get_basis_name()

Clone # 208
Distance between two fragments = 0
Clone size = 5

Source file "report/ppt.py" The first line is 211 |  | Source file "report/latex.py" The first line is 223
if isinstance(el, basestring): return el |  | if isinstance(el, basestring): return el
if type(el) in (int, _np.int64): return ('%d') % (el) |  | if type(el) in (int, _np.int64): return ('%d') % (el)
if (el is None) or (_np.isnan(el)): return '--' |  | if (el is None) or (_np.isnan(el)): return '--'

Clone # 209
Distance between two fragments = 4
Clone size = 5

Source file "report/results.py" The first line is 3727 |  | Source file "report/results.py" The first line is 2925
qtys['whackamole_plot_figures'] = whackamoleplots |  | qtys['whackamole_plot_slides'] = whackamoleplots
if bWasInteractive: _matplotlib.pyplot.ion() |  | if bWasInteractive: _matplotlib.pyplot.ion()
printer.log('*** Merging into template file ***') |  | printer.log('*** Assembling PPT file ***')
mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex')) |  | mainPPTFilename = _os.path.join(report_dir, (report_base) + ('.pptx'))

Clone # 210
Distance between two fragments = 3
Clone size = 5

Source file "report/results.py" The first line is 2549 |  | Source file "report/results.py" The first line is 2925
qtys['whackamole_plot_slides'] = whackamoleplots |  | qtys['whackamole_plot_slides'] = whackamoleplots
if bWasInteractive: _matplotlib.pyplot.ion() |  | if bWasInteractive: _matplotlib.pyplot.ion()
printer.log('*** Merging into template file ***') |  | printer.log('*** Assembling PPT file ***')
mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex')) |  | mainPPTFilename = _os.path.join(report_dir, (report_base) + ('.pptx'))

Clone # 211
Distance between two fragments = 4
Clone size = 5

Source file "report/results.py" The first line is 1855 |  | Source file "report/results.py" The first line is 2925
qtys['whackamole_plot_figures'] = whackamoleplots |  | qtys['whackamole_plot_slides'] = whackamoleplots
if bWasInteractive: _matplotlib.pyplot.ion() |  | if bWasInteractive: _matplotlib.pyplot.ion()
printer.log('*** Merging into template file ***') |  | printer.log('*** Assembling PPT file ***')
mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex')) |  | mainPPTFilename = _os.path.join(report_dir, (report_base) + ('.pptx'))

Clone # 212
Distance between two fragments = 4
Clone size = 5

Source file "report/results.py" The first line is 304 |  | Source file "report/results.py" The first line is 277
s += '\n' |  | s += '\n'
s += "NOTE: passing 'tips=True' to create_full_report_pdf or\n" |  | s += 'I can create reports for you directly, via my create_XXX\n'
s += ' create_brief_report_pdf will add markup to the resulting\n' |  | s += 'functions, or you can query me for result data via members:\n\n'
s += ' PDF indicating how tables and figures in the PDF correspond\n' |  | s += ' .dataset -- the DataSet used to generate these results\n\n'
s += ' to the values of .tables[ ] and .figures[ ] listed above.\n' |  | s += ' .gatesets -- a dictionary of GateSet objects w/keys:\n'

Clone # 213
Distance between two fragments = 4
Clone size = 5

Source file "report/table.py" The first line is 188 |  | Source file "report/results.py" The first line is 277
s += '\n' |  | s += '\n'
s += 'Access row and column data by indexing into this object\n' |  | s += 'I can create reports for you directly, via my create_XXX\n'
s += ' as a dictionary using the column header followed by the\n' |  | s += 'functions, or you can query me for result data via members:\n\n'
s += ' value of the first element of each row, i.e.,\n' |  | s += ' .dataset -- the DataSet used to generate these results\n\n'
s += ' tableObj[][].\n' |  | s += ' .gatesets -- a dictionary of GateSet objects w/keys:\n'

Clone # 214
Distance between two fragments = 2
Clone size = 5

Source file "report/results.py" The first line is 2141 |  | Source file "report/results.py" The first line is 2551
if bWasInteractive: _matplotlib.pyplot.ion() |  | if bWasInteractive: _matplotlib.pyplot.ion()
printer.log('*** Merging into template file ***') |  | printer.log('*** Merging into template file ***')
mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex')) |  | mainTexFilename = _os.path.join(report_dir, (report_base) + ('.tex'))
appendicesTexFilename = _os.path.join(report_dir, (report_base) + ('_appendices.tex')) |  | pdfFilename = _os.path.join(report_dir, (report_base) + ('.pdf'))

Clone # 215
Distance between two fragments = 3
Clone size = 5

Source file "report/generation.py" The first line is 485 |  | Source file "report/generation.py" The first line is 396
for gl in gateLabels: if confidenceRegionInfo is None: rowData = ([gl]) + ([(qtys[('%s %s') % ((gl, qty))].get_value(), None) for qty in qtyNames ]) else: rowData = ([gl]) + ([qtys[('%s %s') % ((gl, qty))].get_value_and_err_bar() for qty in qtyNames ]) table.addrow(rowData, formatters) |  | for l in prepLabels: if confidenceRegionInfo is None: rowData = ([l]) + ([(qtys[('%s prep %s') % ((l, qty))].get_value(), None) for qty in qtyNames ]) else: rowData = ([l]) + ([qtys[('%s prep %s') % ((l, qty))].get_value_and_err_bar() for qty in qtyNames ]) table.addrow(rowData, formatters)

Clone # 216
Distance between two fragments = 3
Clone size = 5

Source file "report/generation.py" The first line is 352 |  | Source file "report/generation.py" The first line is 396
for gl in gateLabels: if confidenceRegionInfo is None: rowData = ([gl]) + ([(qtys[('%s %s') % ((gl, qty))].get_value(), None) for qty in qtyNames ]) else: rowData = ([gl]) + ([qtys[('%s %s') % ((gl, qty))].get_value_and_err_bar() for qty in qtyNames ]) table.addrow(rowData, formatters) |  | for l in prepLabels: if confidenceRegionInfo is None: rowData = ([l]) + ([(qtys[('%s prep %s') % ((l, qty))].get_value(), None) for qty in qtyNames ]) else: rowData = ([l]) + ([qtys[('%s prep %s') % ((l, qty))].get_value_and_err_bar() for qty in qtyNames ]) table.addrow(rowData, formatters)

Clone # 217
Distance between two fragments = 1
Clone size = 5

Source file "report/table.py" The first line is 43 |  | Source file "report/table.py" The first line is 71
if self._headingFormatters is not None: colHeadings_formatted = formatSet.formatList(self._headings, self._headingFormatters, 'latex') else: colHeadings_formatted = self._headings['latex'] |  | if self._headingFormatters is not None: colHeadings_formatted = formatSet.formatList(self._headings, self._headingFormatters, 'html') else: colHeadings_formatted = self._headings['html']

Clone # 218
Distance between two fragments = 1
Clone size = 5

Source file "report/table.py" The first line is 125 |  | Source file "report/table.py" The first line is 71
if self._headingFormatters is not None: colHeadings_formatted = formatSet.formatList(self._headings, self._headingFormatters, 'ppt') else: colHeadings_formatted = self._headings['ppt'] |  | if self._headingFormatters is not None: colHeadings_formatted = formatSet.formatList(self._headings, self._headingFormatters, 'html') else: colHeadings_formatted = self._headings['html']

Clone # 219
Distance between two fragments = 1
Clone size = 5

Source file "report/table.py" The first line is 125 |  | Source file "report/table.py" The first line is 43
if self._headingFormatters is not None: colHeadings_formatted = formatSet.formatList(self._headings, self._headingFormatters, 'ppt') else: colHeadings_formatted = self._headings['ppt'] |  | if self._headingFormatters is not None: colHeadings_formatted = formatSet.formatList(self._headings, self._headingFormatters, 'latex') else: colHeadings_formatted = self._headings['latex']

Clone # 220
Distance between two fragments = 1
Clone size = 5

Source file "report/table.py" The first line is 99 |  | Source file "report/table.py" The first line is 71
if self._headingFormatters is not None: colHeadings_formatted = formatSet.formatList(self._headings, self._headingFormatters, 'text') else: colHeadings_formatted = self._headings['text'] |  | if self._headingFormatters is not None: colHeadings_formatted = formatSet.formatList(self._headings, self._headingFormatters, 'html') else: colHeadings_formatted = self._headings['html']

Clone # 221
Distance between two fragments = 1
Clone size = 5

Source file "report/table.py" The first line is 99 |  | Source file "report/table.py" The first line is 43
if self._headingFormatters is not None: colHeadings_formatted = formatSet.formatList(self._headings, self._headingFormatters, 'text') else: colHeadings_formatted = self._headings['text'] |  | if self._headingFormatters is not None: colHeadings_formatted = formatSet.formatList(self._headings, self._headingFormatters, 'latex') else: colHeadings_formatted = self._headings['latex']

Clone # 222
Distance between two fragments = 1
Clone size = 5

Source file "report/generation.py" The first line is 476 |  | Source file "report/generation.py" The first line is 807
qtyNames = ('angle btwn rotn axes') |  | qtyNames = ('relative eigenvalues')
qtys_to_compute = [('%s %s') % ((gl, qty)) for qty in qtyNames for gl in gateLabels ] |  | qtys_to_compute = [('%s %s') % ((gl, qty)) for qty in qtyNames for gl in gateLabels ]
qtys = _cr.compute_gateset_gateset_qtys(qtys_to_compute, gateset, targetGateset, confidenceRegionInfo) |  | qtys = _cr.compute_gateset_gateset_qtys(qtys_to_compute, gateset, targetGateset, confidenceRegionInfo)
table = _ReportTable(colHeadings, formatters) |  | table = _ReportTable(colHeadings, formatters)

Clone # 223
Distance between two fragments = 4
Clone size = 5

Source file "report/formatter.py" The first line is 272 |  | Source file "report/formatter.py" The first line is 257
FormatSet.formatDict['Precision'] = {'html': _PrecisionFormatter(html_value), 'latex': _PrecisionFormatter(latex_value), 'text': _no_format, 'ppt': _PrecisionFormatter(ppt_value)} |  | FormatSet.formatDict['Normal'] = {'html': _PrecisionFormatter(html), 'latex': _PrecisionFormatter(latex), 'text': _no_format, 'ppt': _PrecisionFormatter(ppt)}

Clone # 224
Distance between two fragments = 2
Clone size = 5

Source file "report/reportables.py" The first line is 843 |  | Source file "report/reportables.py" The first line is 812
FQty = _getEffectQuantity(fidelity, gateset1, effectLabel, eps, confidenceRegionInfo) |  | FQty = _getPrepQuantity(fidelity, gateset1, prepLabel, eps, confidenceRegionInfo)
InFQty = ReportableQty((1.0) - (FQty.get_value()), FQty.get_err_bar()) |  | InFQty = ReportableQty((1.0) - (FQty.get_value()), FQty.get_err_bar())
if key in qtynames: ret[key] = FQty |  | if key in qtynames: ret[key] = FQty
if key2 in qtynames: ret[key2] = InFQty |  | if key2 in qtynames: ret[key2] = InFQty

Clone # 225
Distance between two fragments = 0
Clone size = 5

Source file "report/results.py" The first line is 3413 |  | Source file "report/results.py" The first line is 1631
qtys[key] = self.tables.get(key, verbosity=(printer) - (1)).render('latex', longtables=self.options.long_tables, scratchDir=D, precision=self.options.precision, polarprecision=self.options.polar_precision) |  | qtys[key] = self.tables.get(key, verbosity=(printer) - (1)).render('latex', longtables=self.options.long_tables, scratchDir=D, precision=self.options.precision, polarprecision=self.options.polar_precision)
qtys[('tt_') + (key)] = tooltiptex((".tables['%s']") % (key)) |  | qtys[('tt_') + (key)] = tooltiptex((".tables['%s']") % (key))

Clone # 226
Distance between two fragments = 0
Clone size = 5

Source file "report/results.py" The first line is 2365 |  | Source file "report/results.py" The first line is 1631
qtys[key] = self.tables.get(key, verbosity=(printer) - (1)).render('latex', longtables=self.options.long_tables, scratchDir=D, precision=self.options.precision, polarprecision=self.options.polar_precision) |  | qtys[key] = self.tables.get(key, verbosity=(printer) - (1)).render('latex', longtables=self.options.long_tables, scratchDir=D, precision=self.options.precision, polarprecision=self.options.polar_precision)
qtys[('tt_') + (key)] = tooltiptex((".tables['%s']") % (key)) |  | qtys[('tt_') + (key)] = tooltiptex((".tables['%s']") % (key))

Clone # 227
Distance between two fragments = 0
Clone size = 5

Source file "report/results.py" The first line is 2086 |  | Source file "report/results.py" The first line is 1631
qtys[key] = self.tables.get(key, verbosity=(printer) - (1)).render('latex', longtables=self.options.long_tables, scratchDir=D, precision=self.options.precision, polarprecision=self.options.polar_precision) |  | qtys[key] = self.tables.get(key, verbosity=(printer) - (1)).render('latex', longtables=self.options.long_tables, scratchDir=D, precision=self.options.precision, polarprecision=self.options.polar_precision)
qtys[('tt_') + (key)] = tooltiptex((".tables['%s']") % (key)) |  | qtys[('tt_') + (key)] = tooltiptex((".tables['%s']") % (key))

Clone # 228
Distance between two fragments = 0
Clone size = 5

Source file "report/results.py" The first line is 982 |  | Source file "report/results.py" The first line is 386
def validate_essential(key): return [key] if self._bEssentialResultsSet else [] |  | def validate_essential(key): return [key] if self._bEssentialResultsSet else []
def validate_LsAndGerms(key): return [key] if (self._bEssentialResultsSet and self._LsAndGermInfoSet) else [] |  | def validate_LsAndGerms(key): return [key] if (self._bEssentialResultsSet and self._LsAndGermInfoSet) else []

Clone # 229
Distance between two fragments = 4
Clone size = 5

Source file "report/reportables.py" The first line is 257 |  | Source file "report/reportables.py" The first line is 159
def compute_gateset_qty(qtyname, gateset, confidenceRegionInfo=None): ret = compute_gateset_qtys([qtyname], gateset, confidenceRegionInfo) if qtyname is None: return ret elif qtyname in ret: return ret[qtyname] else: return None |  | def compute_dataset_qty(qtyname, dataset, gatestrings=None): ret = compute_dataset_qtys([qtyname], dataset, gatestrings) if qtyname is None: return ret elif qtyname in ret: return ret[qtyname] else: return None

Clone # 230
Distance between two fragments = 2
Clone size = 5

Source file "report/formatter.py" The first line is 380 |  | Source file "report/formatter.py" The first line is 372
FormatSet.formatDict['VecErrorBars'] = {'html': _EB_html, 'latex': _VEB_latex, 'text': _EB_text, 'ppt': _EB_ppt} |  | FormatSet.formatDict['ErrorBars'] = {'html': _EB_html, 'latex': _EB_latex, 'text': _EB_text, 'ppt': _EB_ppt}

Clone # 231
Distance between two fragments = 3
Clone size = 5

Source file "report/reportables.py" The first line is 843 |  | Source file "report/reportables.py" The first line is 705
FQty = _getEffectQuantity(fidelity, gateset1, effectLabel, eps, confidenceRegionInfo) |  | FQty = _getGateQuantity(process_fidelity, gateset1, gateLabel, eps, confidenceRegionInfo)
InFQty = ReportableQty((1.0) - (FQty.get_value()), FQty.get_err_bar()) |  | InFQty = ReportableQty((1.0) - (FQty.get_value()), FQty.get_err_bar())
if key in qtynames: ret[key] = FQty |  | if key in qtynames: ret[key] = FQty
if key2 in qtynames: ret[key2] = InFQty |  | if key2 in qtynames: ret[key2] = InFQty

Clone # 232
Distance between two fragments = 3
Clone size = 5

Source file "report/reportables.py" The first line is 812 |  | Source file "report/reportables.py" The first line is 705
FQty = _getPrepQuantity(fidelity, gateset1, prepLabel, eps, confidenceRegionInfo) |  | FQty = _getGateQuantity(process_fidelity, gateset1, gateLabel, eps, confidenceRegionInfo)
InFQty = ReportableQty((1.0) - (FQty.get_value()), FQty.get_err_bar()) |  | InFQty = ReportableQty((1.0) - (FQty.get_value()), FQty.get_err_bar())
if key in qtynames: ret[key] = FQty |  | if key in qtynames: ret[key] = FQty
if key2 in qtynames: ret[key2] = InFQty |  | if key2 in qtynames: ret[key2] = InFQty

Clone # 233
Distance between two fragments = 3
Clone size = 5

Source file "report/results.py" The first line is 637 |  | Source file "report/results.py" The first line is 643
def getPlotFn(): obj = self.parameters['objective'] assert obj in ('chi2', 'logl') if obj == 'chi2': return _plotting.chi2_boxplot elif obj == 'logl': return _plotting.logl_boxplot |  | def getDirectPlotFn(): obj = self.parameters['objective'] assert obj in ('chi2', 'logl') if obj == 'chi2': return _plotting.direct_chi2_boxplot elif obj == 'logl': return _plotting.direct_logl_boxplot

Clone # 234
Distance between two fragments = 3
Clone size = 5

Source file "report/results.py" The first line is 643 |  | Source file "report/results.py" The first line is 649
def getDirectPlotFn(): obj = self.parameters['objective'] assert obj in ('chi2', 'logl') if obj == 'chi2': return _plotting.direct_chi2_boxplot elif obj == 'logl': return _plotting.direct_logl_boxplot |  | def getWhackAMolePlotFn(): obj = self.parameters['objective'] assert obj in ('chi2', 'logl') if obj == 'chi2': return _plotting.whack_a_chi2_mole_boxplot elif obj == 'logl': return _plotting.whack_a_logl_mole_boxplot

Clone # 235
Distance between two fragments = 3
Clone size = 5

Source file "report/results.py" The first line is 637 |  | Source file "report/results.py" The first line is 649
def getPlotFn(): obj = self.parameters['objective'] assert obj in ('chi2', 'logl') if obj == 'chi2': return _plotting.chi2_boxplot elif obj == 'logl': return _plotting.logl_boxplot |  | def getWhackAMolePlotFn(): obj = self.parameters['objective'] assert obj in ('chi2', 'logl') if obj == 'chi2': return _plotting.whack_a_chi2_mole_boxplot elif obj == 'logl': return _plotting.whack_a_logl_mole_boxplot

Clone # 236
Distance between two fragments = 2
Clone size = 5

Source file "report/results.py" The first line is 3013 |  | Source file "report/results.py" The first line is 3026
tf = table.cell(0, i).text_frame |  | tf = table.cell(i, j).text_frame
tf.vertical_anchor = MSO_ANCHOR.MIDDLE |  | tf.vertical_anchor = MSO_ANCHOR.MIDDLE
tf.auto_size = MSO_AUTO_SIZE.SHAPE_TO_FIT_TEXT |  | tf.auto_size = MSO_AUTO_SIZE.SHAPE_TO_FIT_TEXT
tf.word_wrap = False |  | tf.word_wrap = False
tf.paragraphs[0].alignment = PP_ALIGN.CENTER |  | tf.paragraphs[0].alignment = PP_ALIGN.CENTER

Clone Digger is aimed to find software clones in Python and Java programs. It is provided under the GPL license and can be downloaded from the site http://clonedigger.sourceforge.net