pyGSTi 0.9.12.1__cp310-cp310-win_amd64.whl → 0.9.13__cp310-cp310-win_amd64.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. pyGSTi-0.9.13.dist-info/METADATA +197 -0
  2. {pyGSTi-0.9.12.1.dist-info → pyGSTi-0.9.13.dist-info}/RECORD +207 -217
  3. {pyGSTi-0.9.12.1.dist-info → pyGSTi-0.9.13.dist-info}/WHEEL +1 -1
  4. pygsti/_version.py +2 -2
  5. pygsti/algorithms/contract.py +1 -1
  6. pygsti/algorithms/core.py +42 -28
  7. pygsti/algorithms/fiducialselection.py +17 -8
  8. pygsti/algorithms/gaugeopt.py +2 -2
  9. pygsti/algorithms/germselection.py +87 -77
  10. pygsti/algorithms/mirroring.py +0 -388
  11. pygsti/algorithms/randomcircuit.py +165 -1333
  12. pygsti/algorithms/rbfit.py +0 -234
  13. pygsti/baseobjs/basis.py +94 -396
  14. pygsti/baseobjs/errorgenbasis.py +0 -132
  15. pygsti/baseobjs/errorgenspace.py +0 -10
  16. pygsti/baseobjs/label.py +52 -168
  17. pygsti/baseobjs/opcalc/fastopcalc.cp310-win_amd64.pyd +0 -0
  18. pygsti/baseobjs/opcalc/fastopcalc.pyx +2 -2
  19. pygsti/baseobjs/polynomial.py +13 -595
  20. pygsti/baseobjs/statespace.py +1 -0
  21. pygsti/circuits/__init__.py +1 -1
  22. pygsti/circuits/circuit.py +682 -505
  23. pygsti/circuits/circuitconstruction.py +0 -4
  24. pygsti/circuits/circuitlist.py +47 -5
  25. pygsti/circuits/circuitparser/__init__.py +8 -8
  26. pygsti/circuits/circuitparser/fastcircuitparser.cp310-win_amd64.pyd +0 -0
  27. pygsti/circuits/circuitstructure.py +3 -3
  28. pygsti/circuits/cloudcircuitconstruction.py +1 -1
  29. pygsti/data/datacomparator.py +2 -7
  30. pygsti/data/dataset.py +46 -44
  31. pygsti/data/hypothesistest.py +0 -7
  32. pygsti/drivers/bootstrap.py +0 -49
  33. pygsti/drivers/longsequence.py +2 -1
  34. pygsti/evotypes/basereps_cython.cp310-win_amd64.pyd +0 -0
  35. pygsti/evotypes/chp/opreps.py +0 -61
  36. pygsti/evotypes/chp/statereps.py +0 -32
  37. pygsti/evotypes/densitymx/effectcreps.cpp +9 -10
  38. pygsti/evotypes/densitymx/effectreps.cp310-win_amd64.pyd +0 -0
  39. pygsti/evotypes/densitymx/effectreps.pyx +1 -1
  40. pygsti/evotypes/densitymx/opreps.cp310-win_amd64.pyd +0 -0
  41. pygsti/evotypes/densitymx/opreps.pyx +2 -2
  42. pygsti/evotypes/densitymx/statereps.cp310-win_amd64.pyd +0 -0
  43. pygsti/evotypes/densitymx/statereps.pyx +1 -1
  44. pygsti/evotypes/densitymx_slow/effectreps.py +7 -23
  45. pygsti/evotypes/densitymx_slow/opreps.py +16 -23
  46. pygsti/evotypes/densitymx_slow/statereps.py +10 -3
  47. pygsti/evotypes/evotype.py +39 -2
  48. pygsti/evotypes/stabilizer/effectreps.cp310-win_amd64.pyd +0 -0
  49. pygsti/evotypes/stabilizer/effectreps.pyx +0 -4
  50. pygsti/evotypes/stabilizer/opreps.cp310-win_amd64.pyd +0 -0
  51. pygsti/evotypes/stabilizer/opreps.pyx +0 -4
  52. pygsti/evotypes/stabilizer/statereps.cp310-win_amd64.pyd +0 -0
  53. pygsti/evotypes/stabilizer/statereps.pyx +1 -5
  54. pygsti/evotypes/stabilizer/termreps.cp310-win_amd64.pyd +0 -0
  55. pygsti/evotypes/stabilizer/termreps.pyx +0 -7
  56. pygsti/evotypes/stabilizer_slow/effectreps.py +0 -22
  57. pygsti/evotypes/stabilizer_slow/opreps.py +0 -4
  58. pygsti/evotypes/stabilizer_slow/statereps.py +0 -4
  59. pygsti/evotypes/statevec/effectreps.cp310-win_amd64.pyd +0 -0
  60. pygsti/evotypes/statevec/effectreps.pyx +1 -1
  61. pygsti/evotypes/statevec/opreps.cp310-win_amd64.pyd +0 -0
  62. pygsti/evotypes/statevec/opreps.pyx +2 -2
  63. pygsti/evotypes/statevec/statereps.cp310-win_amd64.pyd +0 -0
  64. pygsti/evotypes/statevec/statereps.pyx +1 -1
  65. pygsti/evotypes/statevec/termreps.cp310-win_amd64.pyd +0 -0
  66. pygsti/evotypes/statevec/termreps.pyx +0 -7
  67. pygsti/evotypes/statevec_slow/effectreps.py +0 -3
  68. pygsti/evotypes/statevec_slow/opreps.py +0 -5
  69. pygsti/extras/__init__.py +0 -1
  70. pygsti/extras/drift/stabilityanalyzer.py +3 -1
  71. pygsti/extras/interpygate/__init__.py +12 -0
  72. pygsti/extras/interpygate/core.py +0 -36
  73. pygsti/extras/interpygate/process_tomography.py +44 -10
  74. pygsti/extras/rpe/rpeconstruction.py +0 -2
  75. pygsti/forwardsims/__init__.py +1 -0
  76. pygsti/forwardsims/forwardsim.py +14 -55
  77. pygsti/forwardsims/mapforwardsim.py +69 -18
  78. pygsti/forwardsims/mapforwardsim_calc_densitymx.cp310-win_amd64.pyd +0 -0
  79. pygsti/forwardsims/mapforwardsim_calc_densitymx.pyx +65 -66
  80. pygsti/forwardsims/mapforwardsim_calc_generic.py +91 -13
  81. pygsti/forwardsims/matrixforwardsim.py +63 -15
  82. pygsti/forwardsims/termforwardsim.py +8 -110
  83. pygsti/forwardsims/termforwardsim_calc_stabilizer.cp310-win_amd64.pyd +0 -0
  84. pygsti/forwardsims/termforwardsim_calc_statevec.cp310-win_amd64.pyd +0 -0
  85. pygsti/forwardsims/termforwardsim_calc_statevec.pyx +0 -651
  86. pygsti/forwardsims/torchfwdsim.py +265 -0
  87. pygsti/forwardsims/weakforwardsim.py +2 -2
  88. pygsti/io/__init__.py +1 -2
  89. pygsti/io/mongodb.py +0 -2
  90. pygsti/io/stdinput.py +6 -22
  91. pygsti/layouts/copalayout.py +10 -12
  92. pygsti/layouts/distlayout.py +0 -40
  93. pygsti/layouts/maplayout.py +103 -25
  94. pygsti/layouts/matrixlayout.py +99 -60
  95. pygsti/layouts/prefixtable.py +1534 -52
  96. pygsti/layouts/termlayout.py +1 -1
  97. pygsti/modelmembers/instruments/instrument.py +3 -3
  98. pygsti/modelmembers/instruments/tpinstrument.py +2 -2
  99. pygsti/modelmembers/modelmember.py +0 -17
  100. pygsti/modelmembers/operations/__init__.py +2 -4
  101. pygsti/modelmembers/operations/affineshiftop.py +1 -0
  102. pygsti/modelmembers/operations/composederrorgen.py +1 -1
  103. pygsti/modelmembers/operations/composedop.py +1 -24
  104. pygsti/modelmembers/operations/denseop.py +5 -5
  105. pygsti/modelmembers/operations/eigpdenseop.py +2 -2
  106. pygsti/modelmembers/operations/embeddederrorgen.py +1 -1
  107. pygsti/modelmembers/operations/embeddedop.py +0 -1
  108. pygsti/modelmembers/operations/experrorgenop.py +2 -2
  109. pygsti/modelmembers/operations/fullarbitraryop.py +1 -0
  110. pygsti/modelmembers/operations/fullcptpop.py +2 -2
  111. pygsti/modelmembers/operations/fulltpop.py +28 -6
  112. pygsti/modelmembers/operations/fullunitaryop.py +5 -4
  113. pygsti/modelmembers/operations/lindbladcoefficients.py +93 -78
  114. pygsti/modelmembers/operations/lindbladerrorgen.py +268 -441
  115. pygsti/modelmembers/operations/linearop.py +7 -27
  116. pygsti/modelmembers/operations/opfactory.py +1 -1
  117. pygsti/modelmembers/operations/repeatedop.py +1 -24
  118. pygsti/modelmembers/operations/staticstdop.py +1 -1
  119. pygsti/modelmembers/povms/__init__.py +3 -3
  120. pygsti/modelmembers/povms/basepovm.py +7 -36
  121. pygsti/modelmembers/povms/complementeffect.py +4 -9
  122. pygsti/modelmembers/povms/composedeffect.py +0 -320
  123. pygsti/modelmembers/povms/computationaleffect.py +1 -1
  124. pygsti/modelmembers/povms/computationalpovm.py +3 -1
  125. pygsti/modelmembers/povms/effect.py +3 -5
  126. pygsti/modelmembers/povms/marginalizedpovm.py +0 -79
  127. pygsti/modelmembers/povms/tppovm.py +74 -2
  128. pygsti/modelmembers/states/__init__.py +2 -5
  129. pygsti/modelmembers/states/composedstate.py +0 -317
  130. pygsti/modelmembers/states/computationalstate.py +3 -3
  131. pygsti/modelmembers/states/cptpstate.py +4 -4
  132. pygsti/modelmembers/states/densestate.py +6 -4
  133. pygsti/modelmembers/states/fullpurestate.py +0 -24
  134. pygsti/modelmembers/states/purestate.py +1 -1
  135. pygsti/modelmembers/states/state.py +5 -6
  136. pygsti/modelmembers/states/tpstate.py +28 -10
  137. pygsti/modelmembers/term.py +3 -6
  138. pygsti/modelmembers/torchable.py +50 -0
  139. pygsti/modelpacks/_modelpack.py +1 -1
  140. pygsti/modelpacks/smq1Q_ZN.py +3 -1
  141. pygsti/modelpacks/smq2Q_XXYYII.py +2 -1
  142. pygsti/modelpacks/smq2Q_XY.py +3 -3
  143. pygsti/modelpacks/smq2Q_XYI.py +2 -2
  144. pygsti/modelpacks/smq2Q_XYICNOT.py +3 -3
  145. pygsti/modelpacks/smq2Q_XYICPHASE.py +3 -3
  146. pygsti/modelpacks/smq2Q_XYXX.py +1 -1
  147. pygsti/modelpacks/smq2Q_XYZICNOT.py +3 -3
  148. pygsti/modelpacks/smq2Q_XYZZ.py +1 -1
  149. pygsti/modelpacks/stdtarget.py +0 -121
  150. pygsti/models/cloudnoisemodel.py +1 -2
  151. pygsti/models/explicitcalc.py +3 -3
  152. pygsti/models/explicitmodel.py +3 -13
  153. pygsti/models/fogistore.py +5 -3
  154. pygsti/models/localnoisemodel.py +1 -2
  155. pygsti/models/memberdict.py +0 -12
  156. pygsti/models/model.py +800 -65
  157. pygsti/models/modelconstruction.py +4 -4
  158. pygsti/models/modelnoise.py +2 -2
  159. pygsti/models/modelparaminterposer.py +1 -1
  160. pygsti/models/oplessmodel.py +1 -1
  161. pygsti/models/qutrit.py +15 -14
  162. pygsti/objectivefns/objectivefns.py +73 -138
  163. pygsti/objectivefns/wildcardbudget.py +2 -7
  164. pygsti/optimize/__init__.py +1 -0
  165. pygsti/optimize/arraysinterface.py +28 -0
  166. pygsti/optimize/customcg.py +0 -12
  167. pygsti/optimize/customlm.py +129 -323
  168. pygsti/optimize/customsolve.py +2 -2
  169. pygsti/optimize/optimize.py +0 -84
  170. pygsti/optimize/simplerlm.py +841 -0
  171. pygsti/optimize/wildcardopt.py +19 -598
  172. pygsti/protocols/confidenceregionfactory.py +28 -14
  173. pygsti/protocols/estimate.py +31 -14
  174. pygsti/protocols/gst.py +142 -68
  175. pygsti/protocols/modeltest.py +6 -10
  176. pygsti/protocols/protocol.py +9 -37
  177. pygsti/protocols/rb.py +450 -79
  178. pygsti/protocols/treenode.py +8 -2
  179. pygsti/protocols/vb.py +108 -206
  180. pygsti/protocols/vbdataframe.py +1 -1
  181. pygsti/report/factory.py +0 -15
  182. pygsti/report/fogidiagram.py +1 -17
  183. pygsti/report/modelfunction.py +12 -3
  184. pygsti/report/mpl_colormaps.py +1 -1
  185. pygsti/report/plothelpers.py +8 -2
  186. pygsti/report/reportables.py +41 -37
  187. pygsti/report/templates/offline/pygsti_dashboard.css +6 -0
  188. pygsti/report/templates/offline/pygsti_dashboard.js +12 -0
  189. pygsti/report/workspace.py +2 -14
  190. pygsti/report/workspaceplots.py +326 -504
  191. pygsti/tools/basistools.py +9 -36
  192. pygsti/tools/edesigntools.py +124 -96
  193. pygsti/tools/fastcalc.cp310-win_amd64.pyd +0 -0
  194. pygsti/tools/fastcalc.pyx +35 -81
  195. pygsti/tools/internalgates.py +151 -15
  196. pygsti/tools/jamiolkowski.py +5 -5
  197. pygsti/tools/lindbladtools.py +19 -11
  198. pygsti/tools/listtools.py +0 -114
  199. pygsti/tools/matrixmod2.py +1 -1
  200. pygsti/tools/matrixtools.py +173 -339
  201. pygsti/tools/nameddict.py +1 -1
  202. pygsti/tools/optools.py +154 -88
  203. pygsti/tools/pdftools.py +0 -25
  204. pygsti/tools/rbtheory.py +3 -320
  205. pygsti/tools/slicetools.py +64 -12
  206. pyGSTi-0.9.12.1.dist-info/METADATA +0 -155
  207. pygsti/algorithms/directx.py +0 -711
  208. pygsti/evotypes/qibo/__init__.py +0 -33
  209. pygsti/evotypes/qibo/effectreps.py +0 -78
  210. pygsti/evotypes/qibo/opreps.py +0 -376
  211. pygsti/evotypes/qibo/povmreps.py +0 -98
  212. pygsti/evotypes/qibo/statereps.py +0 -174
  213. pygsti/extras/rb/__init__.py +0 -13
  214. pygsti/extras/rb/benchmarker.py +0 -957
  215. pygsti/extras/rb/dataset.py +0 -378
  216. pygsti/extras/rb/io.py +0 -814
  217. pygsti/extras/rb/simulate.py +0 -1020
  218. pygsti/io/legacyio.py +0 -385
  219. pygsti/modelmembers/povms/denseeffect.py +0 -142
  220. {pyGSTi-0.9.12.1.dist-info → pyGSTi-0.9.13.dist-info}/LICENSE +0 -0
  221. {pyGSTi-0.9.12.1.dist-info → pyGSTi-0.9.13.dist-info}/top_level.txt +0 -0
@@ -17,132 +17,6 @@ from pygsti.baseobjs.nicelyserializable import NicelySerializable as _NicelySeri
17
17
  from pygsti.tools import rbtools as _rbt
18
18
 
19
19
 
20
- # Obsolute function to be deleted.
21
- # def std_practice_analysis(RBSdataset, seed=[0.8, 0.95], bootstrap_samples=200, asymptote='std', rtype='EI',
22
- # datatype='auto'):
23
- # """
24
- # Implements a "standard practice" analysis of RB data. Fits the average success probabilities to the exponential
25
- # decay A + Bp^m, using least-squares fitting, with (1) A fixed (as standard, to 1/2^n where n is the number of
26
- # qubits the data is for), and (2) A, B and p all allowed to varying. Confidence intervals are also estimated using
27
- # a standard non-parameteric boostrap.
28
-
29
- # Parameters
30
- # ----------
31
- # RBSdataset : RBSummaryDataset
32
- # An RBSUmmaryDataset containing the data to analyze
33
-
34
- # seed : list, optional
35
- # Seeds for the fit of B and p (A is seeded to the asymptote defined by `asympote`).
36
-
37
- # bootstrap_samples : int, optional
38
- # The number of samples in the bootstrap.
39
-
40
- # asymptote : str or float, optional
41
- # The A value for the fitting to A + Bp^m with A fixed. If a string must be 'std', in
42
- # in which case A is fixed to 1/2^n.
43
-
44
- # rtype : {'EI','AGI'}, optional
45
- # The RB error rate rescaling convention. 'EI' results in RB error rates that are associated
46
- # with the entanglement infidelity, which is the error probability with stochastic errors (and
47
- # is equal to the diamond distance). 'AGI' results in RB error rates that are associated with
48
- # average gate infidelity.
49
-
50
- # Returns
51
- # -------
52
- # RBResults
53
- # An object encapsulating the RB results (and data).
54
-
55
- # """
56
- # assert(datatype == 'raw' or datatype == 'adjusted' or datatype == 'auto'), "Unknown data type!"
57
-
58
- # if datatype == 'auto':
59
- # if RBSdataset.datatype == 'hamming_distance_counts':
60
- # datatype = 'adjusted'
61
- # else:
62
- # datatype = 'raw'
63
-
64
- # lengths = RBSdataset.lengths
65
- # n = RBSdataset.num_qubits
66
-
67
- # if isinstance(asymptote, str):
68
- # assert(asymptote == 'std'), "If `asympotote` is a string it must be 'std'!"
69
- # if datatype == 'raw':
70
- # asymptote = 1 / 2**n
71
- # elif datatype == 'adjusted':
72
- # asymptote = 1 / 4**n
73
-
74
- # if datatype == 'adjusted':
75
- # ASPs = RBSdataset.adjusted_ASPs
76
- # if datatype == 'raw':
77
- # ASPs = RBSdataset.ASPs
78
-
79
- # FF_results, FAF_results = std_least_squares_fit(lengths, ASPs, n, seed=seed, asymptote=asymptote,
80
- # ftype='full+FA', rtype=rtype)
81
-
82
- # parameters = ['A', 'B', 'p', 'r']
83
- # bootstraps_FF = {}
84
- # bootstraps_FAF = {}
85
-
86
- # if bootstrap_samples > 0:
87
-
88
- # bootstraps_FF = {p: [] for p in parameters}
89
- # bootstraps_FAF = {p: [] for p in parameters}
90
- # failcount_FF = 0
91
- # failcount_FAF = 0
92
-
93
- # # Add bootstrapped data, if neccessary.
94
- # RBSdataset.add_bootstrapped_datasets(samples=bootstrap_samples)
95
-
96
- # for i in range(bootstrap_samples):
97
-
98
- # if datatype == 'adjusted':
99
- # BS_ASPs = RBSdataset.bootstraps[i].adjusted_ASPs
100
- # if datatype == 'raw':
101
- # BS_ASPs = RBSdataset.bootstraps[i].ASPs
102
-
103
- # BS_FF_results, BS_FAF_results = std_least_squares_fit(lengths, BS_ASPs, n, seed=seed,
104
- # asymptote=asymptote, ftype='full+FA',
105
- # rtype=rtype)
106
-
107
- # if BS_FF_results['success']:
108
- # for p in parameters:
109
- # bootstraps_FF[p].append(BS_FF_results['estimates'][p])
110
- # else:
111
- # failcount_FF += 1
112
- # if BS_FAF_results['success']:
113
- # for p in parameters:
114
- # bootstraps_FAF[p].append(BS_FAF_results['estimates'][p])
115
- # else:
116
- # failcount_FAF += 1
117
-
118
- # failrate_FF = failcount_FF / bootstrap_samples
119
- # failrate_FAF = failcount_FAF / bootstrap_samples
120
-
121
- # std_FF = {p: _np.std(_np.array(bootstraps_FF[p])) for p in parameters}
122
- # std_FAF = {p: _np.std(_np.array(bootstraps_FAF[p])) for p in parameters}
123
-
124
- # else:
125
- # bootstraps_FF = None
126
- # std_FF = None
127
- # failrate_FF = None
128
- # bootstraps_FAF = None
129
- # std_FAF = None
130
- # failrate_FAF = None
131
-
132
- # fits = {}
133
- # fits['full'] = FitResults('LS', FF_results['seed'], rtype, FF_results['success'], FF_results['estimates'],
134
- # FF_results['variable'], stds=std_FF, bootstraps=bootstraps_FF,
135
- # bootstraps_failrate=failrate_FF)
136
-
137
- # fits['A-fixed'] = FitResults('LS', FAF_results['seed'], rtype, FAF_results['success'],
138
- # FAF_results['estimates'], FAF_results['variable'], stds=std_FAF,
139
- # bootstraps=bootstraps_FAF, bootstraps_failrate=failrate_FAF)
140
-
141
- # results = SimpleRBResults(RBSdataset, rtype, fits)
142
-
143
- # return results
144
-
145
-
146
20
  def std_least_squares_fit(lengths, asps, n, seed=None, asymptote=None, ftype='full', rtype='EI'):
147
21
  """
148
22
  Implements a "standard" least-squares fit of RB data.
@@ -469,111 +343,3 @@ class FitResults(_NicelySerializable):
469
343
  return cls(state['fit_type'], state['seed'], state['r_type'], state['success'],
470
344
  state['estimates'], state['variable'], state['stds'],
471
345
  state['bootstraps'], state['bootstraps_failrate'])
472
-
473
- # Obsolute RB results class
474
- # class SimpleRBResults(object):
475
- # """
476
- # An object to contain the results of an RB analysis.
477
-
478
- # """
479
-
480
- # def __init__(self, data, rtype, fits):
481
- # """
482
- # Initialize an RBResults object.
483
-
484
- # Parameters
485
- # ----------
486
- # data : RBSummaryDataset
487
- # The RB summary data that the analysis was performed for.
488
-
489
- # rtype : {'IE','AGI'}
490
- # The type of RB error rate, corresponding to different dimension-dependent
491
- # re-scalings of (1-p), where p is the RB decay constant in A + B*p^m.
492
-
493
- # fits : dict
494
- # A dictionary containing FitResults objects, obtained from one or more
495
- # fits of the data (e.g., a fit with all A, B and p as free parameters and
496
- # a fit with A fixed to 1/2^n).
497
- # """
498
- # self.data = data
499
- # self.rtype = rtype
500
- # self.fits = fits
501
-
502
- # def plot(self, fitkey=None, decay=True, success_probabilities=True, size=(8, 5), ylim=None, xlim=None,
503
- # legend=True, title=None, figpath=None):
504
- # """
505
- # Plots RB data and, optionally, a fitted exponential decay.
506
-
507
- # Parameters
508
- # ----------
509
- # fitkey : dict key, optional
510
- # The key of the self.fits dictionary to plot the fit for. If None, will
511
- # look for a 'full' key (the key for a full fit to A + Bp^m if the standard
512
- # analysis functions are used) and plot this if possible. It otherwise checks
513
- # that there is only one key in the dict and defaults to this. If there are
514
- # multiple keys and none of them are 'full', `fitkey` must be specified when
515
- # `decay` is True.
516
-
517
- # decay : bool, optional
518
- # Whether to plot a fit, or just the data.
519
-
520
- # success_probabilities : bool, optional
521
- # Whether to plot the success probabilities distribution, as a violin plot. (as well
522
- # as the *average* success probabilities at each length).
523
-
524
- # size : tuple, optional
525
- # The figure size
526
-
527
- # ylim, xlim : tuple, optional
528
- # The x and y limits for the figure.
529
-
530
- # legend : bool, optional
531
- # Whether to show a legend.
532
-
533
- # title : str, optional
534
- # A title to put on the figure.
535
-
536
- # figpath : str, optional
537
- # If specified, the figure is saved with this filename.
538
- # """
539
-
540
- # # Future : change to a plotly plot.
541
- # try: import matplotlib.pyplot as _plt
542
- # except ImportError: raise ValueError("This function requires you to install matplotlib!")
543
-
544
- # if decay and fitkey is None:
545
- # allfitkeys = list(self.fits.keys())
546
- # if 'full' in allfitkeys: fitkey = 'full'
547
- # else:
548
- # assert(len(allfitkeys) == 1), \
549
- # "There are multiple fits and none have the key 'full'. Please specify the fit to plot!"
550
- # fitkey = allfitkeys[0]
551
-
552
- # _plt.figure(figsize=size)
553
- # _plt.plot(self.data.lengths, self.data.ASPs, 'o', label='Average success probabilities')
554
-
555
- # if decay:
556
- # lengths = _np.linspace(0, max(self.data.lengths), 200)
557
- # A = self.fits[fitkey].estimates['A']
558
- # B = self.fits[fitkey].estimates['B']
559
- # p = self.fits[fitkey].estimates['p']
560
- # _plt.plot(lengths, A + B * p**lengths,
561
- # label='Fit, r = {:.2} +/- {:.1}'.format(self.fits[fitkey].estimates['r'],
562
- # self.fits[fitkey].stds['r']))
563
-
564
- # if success_probabilities:
565
- # _plt.violinplot(list(self.data.success_probabilities), self.data.lengths, points=10, widths=1.,
566
- # showmeans=False, showextrema=False, showmedians=False) # , label='Success probabilities')
567
-
568
- # if title is not None: _plt.title(title)
569
- # _plt.ylabel("Success probability")
570
- # _plt.xlabel("RB sequence length $(m)$")
571
- # _plt.ylim(ylim)
572
- # _plt.xlim(xlim)
573
-
574
- # if legend: _plt.legend()
575
-
576
- # if figpath is not None: _plt.savefig(figpath, dpi=1000)
577
- # else: _plt.show()
578
-
579
- # return