pygsti.algorithms.germselection.germ_set_spanning_vectors

pygsti.algorithms.germselection.germ_set_spanning_vectors#

germ_set_spanning_vectors(target_model, germ_list, float_type=None, num_nongauge_params=None, tol=1e-06, pretest=False, evd_tol=1e-10, verbosity=1, threshold=1000000.0, mode='greedy', update_cache_low_rank=False, final_test=True, comm=None)#
Parameters:
  • target_model (Model or list of Model) – The model you are aiming to implement, or a list of models that are copies of the model you are trying to implement (either with or without random unitary perturbations applied to the models).

  • num_nongauge_params (int, optional) – Force the number of nongauge parameters rather than rely on automated gauge optimization.

  • float_type (numpy dtype object, optional) – Numpy data type to use for floating point arrays. Automatically resolved based on whether the model’s basis is real-valued. Can be manually specified by user, which can be useful for controlling memory footprint.

  • tol (float, optional) – Tolerance (eps arg) for _compute_bulk_twirled_ddd(), which sets the difference between eigenvalues below which they’re treated as degenerate.

  • pretest (boolean, optional) – Whether germ list should be initially checked for completeness.

  • evd_tol (float, optional) – A threshold value to use when taking eigenvalue decompositions/SVDs such that values below this are set to zero.

  • verbosity (int, optional) – Level of detail printed to stdout.

  • threshold (float, optional) – Value which the score (before penalties are applied) must be lower than for a germ set to be considered AC

  • mode (string, optional (default 'greedy)') – An optional mode string for specifying the search heuristic used for constructing the germ vector set. If ‘greedy’ we use a greedy search algorithm based on low-rank updates. If ‘RRQR’ we use a heuristic for the subset selection problem due to Golub, Klema and Stewart (1976), detailed in chapter 12 of the book “Matrix Computations” by Golub and Van Loan.

  • update_cache_low_rank (bool, optional (default = False)) – A flag indicating whether the psuedoinverses in the update cache used as part of the low-rank update routine should themselves be updated between iterations using low-rank updates. Setting this to True gives a notable performance boost, but I have found that this can also give rise to numerical stability issues, so caveat emptor. Only set to True if you’re sure of what you’re doing.

  • final_test (bool, optional (default True)) – A flag indicating whether a final test should be performed to validate the final score of the germ-vector set found using either the greedy or RRQR based search heuristics. Can be useful in conjunction with the use of update_cache_low_rank, as this can help detect numerical stability problems in the use of low-rank updates for cache construction.

  • comm (mpi4py.MPI.Comm, optional) – When not None, an MPI communicator for distributing the computation across multiple processors.

Returns:

  • germ_vec_dict (dict) – A dictionary whose keys are germs and whose elements are numpy arrays whose columns correspond to the amplified directions in parameter space identified for that germ such that when combined with the amplified directions selected for each other germ in the set we maintain amplificational completeness.

  • currentDDD (ndarray) – The J^T@J matrix for subset of twirled derivative columns selected across all of the germs. The spectrum of this matrix provides information about the amplificational properties of the reduced vector set.