pygsti.report.get_chi2_confidence_region¶
-
pygsti.report.
get_chi2_confidence_region
(gateset, dataset, confidenceLevel, gatestring_list=None, probClipInterval=(-1000000.0, 1000000.0), minProbClipForWeighting=0.0001, hessianProjection='std', regionType='std', comm=None, memLimit=None)¶ Constructs a ConfidenceRegion given a gateset and dataset using the Chi2 Hessian. (Internally, this evaluates the Chi2 Hessian.)
Parameters: - gateset (GateSet) – the gate set point estimate that maximizes the logl or minimizes the chi2, and marks the point in gateset-space where the Hessian has been evaluated.
- dataset (DataSet) – Probability data
- confidenceLevel (float) – If not None, then the confidence level (between 0 and 100) used in the computation of confidence regions/intervals. If None, no confidence regions or intervals are computed.
- gatestring_list (list of (tuples or GateStrings), optional) – Each element specifies a gate string to include in the log-likelihood sum. Default value of None implies all the gate strings in dataset should be used.
- probClipInterval (2-tuple or None, optional) – (min,max) values used to clip the probabilities predicted by gateset. Defaults to no clipping.
- minProbClipForWeighting (float, optional) – Sets the minimum and maximum probability p allowed in the chi^2 weights: N/(p*(1-p)) by clipping probability p values to lie within the interval [ minProbClipForWeighting, 1-minProbClipForWeighting ].
- hessianProjection (string, optional) –
Specifies how (and whether) to project the given hessian matrix onto a non-gauge space. Allowed values are:
- ‘std’ – standard projection onto the space perpendicular to the gauge space.
- ‘none’ – no projection is performed. Useful if the supplied hessian has already been projected.
- ‘optimal gate CIs’ – a lengthier projection process in which a numerical optimization is performed to find the non-gauge space which minimizes the (average) size of the confidence intervals corresponding to gate (as opposed to SPAM vector) parameters.
- regionType ({‘std’, ‘non-markovian’}, optional) – The type of confidence region to create. ‘std’ creates a standard confidence region, while ‘non-markovian’ creates a region which attempts to account for the non-markovian-ness of the data.
- comm (mpi4py.MPI.Comm, optional) – When not None, an MPI communicator for distributing the computation across multiple processors.
- memLimit (int, optional) – A rough memory limit in bytes which restricts the amount of intermediate values that are computed and stored.
Returns: Return type: