pygsti.algorithms.fiducialselection.find_fiducials

Contents

pygsti.algorithms.fiducialselection.find_fiducials#

find_fiducials(target_model, omit_identity=True, eq_thresh=1e-06, ops_to_omit=None, force_empty=True, candidate_fid_counts=2, algorithm='grasp', algorithm_kwargs=None, verbosity=1, prep_fids=True, meas_fids=True, candidate_list=None, return_candidate_list=False, final_test=False, assume_clifford=False, candidate_seed=None, max_fid_length=None)#

Generate prep and measurement fiducials for a given target model.

Parameters:
  • target_model (Model) – The model you are aiming to implement.

  • omit_identity (bool, optional) – Whether to remove the identity gate from the set of gates with which fiducials are constructed. Identity gates do nothing to alter fiducials, and so should almost always be left out.

  • eq_thresh (float, optional) – Threshold for determining if a gate is the identity gate. If the square Frobenius distance between a given gate and the identity gate is less than this threshold, the gate is considered to be an identity gate and will be removed from the list of gates from which to construct fiducials if omit_identity is True.

  • ops_to_omit (list of string, optional) – List of strings identifying gates in the model that should not be used in fiducials. Oftentimes this will include the identity gate, and may also include entangling gates if their fidelity is anticipated to be much worse than that of single-system gates.

  • force_empty (bool, optional (default is True)) – Whether or not to force all fiducial sets to contain the empty gate string as a fiducial.

  • candidate_fid_counts (int or dic, optional) – A dictionary of fid_length : count key-value pairs, specifying the fiducial “candidate list” - a list of potential fiducials to draw from. count is either an integer specifying the number of random fiducials considered at the given fid_length or the special values “all upto” that considers all of the of all the fiducials of length up to the corresponding fid_length. If the keyword ‘all’ is used for the count value then all circuits at that particular length are added. If and integer, all germs of up to length that length are used, the equivalent of {specified_int: ‘all upto’}.

  • algorithm ({'slack', 'grasp', 'greedy'}, optional) –

    Specifies the algorithm to use to generate the fiducials. Current options are:

    ’slack’

    See _find_fiducials_integer_slack() for more details.

    ’grasp’

    Use GRASP to generate random greedy fiducial sets and then locally optimize them. See _find_fiducials_grasp() for more details.

    ’greedy’

    Use a greedy algorithm accelerated using low-rank update techniques. See _find_fiducials_greedy() for more details.

  • algorithm_kwargs (dict) – Dictionary of {'keyword': keyword_arg} pairs providing keyword arguments for the specified algorithm function. See the documentation for functions referred to in the algorithm keyword documentation for what options are available for each algorithm.

  • verbosity (int, optional) – How much detail to send to stdout.

  • candidate_list (list of circuits, optional) – A user specified manually selected list of candidate fiducial circuits. Can speed up testing multiple objective function options, for example.

  • return_candidate_list (bool, optional (default False)) – When True we return the full list of deduped candidate fiducials considered along with the final fiducial lists.

  • final_test (bool, optional (default False)) – When true a final check is performed on the returned solution for the candidate prep and measurement lists using the function test_fiducial_list to verify we have an acceptable candidate set (this uses a different code path in some cases so can be used to detect errors).

  • assume_clifford (bool, optional (default False)) – When true then we assume that all of the circuits are clifford circuits, which allows us to use a faster deduping routine exploiting the properties of clifford circuits.

  • max_fid_length (int, optional (deprecated)) – The maximum number of gates to include in a fiducial. The default is not guaranteed to work for arbitrary models (particularly for quantum systems larger than a single qubit). This keyword is now deprecated. The behavior of the keyword is now equivalent to passing in an int for the candidate_fid_counts argument.

Returns:

  • prepFidList (list of Circuits) – A list containing the circuits for the prep fiducials.

  • measFidList (list of Circuits) – A list containing the circuits for the measurement fiducials.