pygsti.do_iterative_exlgst¶
-
pygsti.
do_iterative_exlgst
(dataset, startGateset, specs, gateStringSetsToUseInEstimation, targetGateset=None, spamDict=None, guessGatesetForGauge=None, svdTruncateTo=0, maxiter=100000, maxfev=None, tol=1e-06, regularizeFactor=0, returnErrorVec=False, returnAll=False, gateStringSetLabels=None, verbosity=0, comm=None, check_jacobian=False)¶ Performs Iterated Extended Linear-inversion Gate Set Tomography on the dataset.
Parameters: - dataset (DataSet) – The data used to generate Extended-LGST estimates
- startGateset (GateSet) – The GateSet used as a starting point for the least-squares optimization.
- specs (2-tuple) – A (prepSpecs,effectSpecs) tuple usually generated by calling build_spam_specs(...)
- gateStringSetsToUseInEstimation (list of lists of (tuples or GateStrings)) – The i-th element is a list of the gate strings to be used in the i-th iteration of extended-LGST. Each element of these lists is a gate string, specifed as either a GateString object or as a tuple of gate labels (but all must be specified using the same type). e.g. [ [ (), (‘Gx’,) ], [ (), (‘Gx’,), (‘Gy’,) ], [ (), (‘Gx’,), (‘Gy’,), (‘Gx’,’Gy’) ] ]
- targetGateset (GateSet, optional) – A gateset used to provide a guess for gauge in which LGST estimates should be returned, and the SPAM labels used to connect the dataset values to rhoVec and EVec indices.
- spamDict (dictionary, optional) – Dictionary mapping (rhoVec_index,EVec_index) integer tuples to string spam labels. Defaults to the spam dictionary of targetGateset e.g. spamDict[(0,0)] == “plus”
- guessGatesetForGauge (GateSet, optional) – A gateset used to compute a gauge transformation that is applied to the LGST estimates before they are returned. Defaults to targetGateset.
- svdTruncateTo (int, optional) – The Hilbert space dimension to truncate the gate matrices to using a SVD to keep only the largest svdToTruncateTo singular values of the I_tildle LGST matrix. Defaults to 0 (no truncation)
- maxiter (int, optional) – Maximum number of iterations in each of the chi^2 optimizations
- maxfev (int, optional) – Maximum number of function evaluations for each of the chi^2 optimizations Defaults to maxiter
- tol (float, optional) – The tolerance for each of the chi^2 optimizations.
- regularizeFactor (float, optional) – Multiplicative prefactor of L2-like regularization term that penalizes gateset entries which have absolute value greater than 1. When set to 0, no regularization is applied.
- returnErrorVec (bool, optional) – If True, return (errorVec, gateset), or (errorVecs, gatesets) if returnAll == True, instead of just the gateset or gatesets.
- returnAll (bool, optional) – If True return a list of gatesets (and errorVecs if returnErrorVec == True), one per iteration, instead of the results from just the final iteration.
- gateStringSetLabels (list of strings, optional) – An identification label for each of the gate string sets (used for displaying progress). Must be the same length as gateStringSetsToUseInEstimation.
- verbosity (int, optional) – How much detail to send to stdout.
- comm (mpi4py.MPI.Comm, optional) – When not None, an MPI communicator for distributing the computation across multiple processors.
- check_jacobian (boolean, optional) – If True, compare the analytic jacobian with a forward finite difference jacobean and print warning messages if there is disagreement.
Returns: - gateset if returnAll == False and returnErrorVec == False
- gatesets if returnAll == True and returnErrorVec == False
- (errorVec, gateset) if returnAll == False and returnErrorVec == True
- (errorVecs, gatesets) if returnAll == True and returnErrorVec == True – where errorVec is a numpy array of minimum error values v = f(x_min), where f(x)**2 is the function being minimized, gateset is the GateSet containing the final estimated gates. In cases when returnAll == True, gatesets and errorVecs are lists whose i-th elements are the errorVec and gateset corresponding to the results of the i-th iteration.