pygsti.algorithms.core.run_gst_fit_simple

pygsti.algorithms.core.run_gst_fit_simple#

run_gst_fit_simple(dataset, start_model, circuits, optimizer, objective_function_builder, resource_alloc, verbosity=0)#

Performs core Gate Set Tomography function of model optimization.

Optimizes the parameters of start_model by minimizing the objective function built by objective_function_builder. Probabilities are computed by the model, and outcome counts are supplied by dataset.

Parameters:
  • dataset (DataSet) – The dataset to obtain counts from.

  • start_model (Model) – The Model used as a starting point for the least-squares optimization.

  • circuits (list of (tuples or Circuits)) – Each tuple contains operation labels and specifies a circuit whose probabilities are considered when trying to least-squares-fit the probabilities given in the dataset. e.g. [ (), (‘Gx’,), (‘Gx’,’Gy’) ]

  • optimizer (Optimizer or dict) – The optimizer to use, or a dictionary of optimizer parameters from which a default optimizer can be built.

  • objective_function_builder (ObjectiveFunctionBuilder) – Defines the objective function that is optimized. Can also be anything readily converted to an objective function builder, e.g. “logl”.

  • resource_alloc (ResourceAllocation) – A resource allocation object containing information about how to divide computation amongst multiple processors and any memory limits that should be imposed.

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

Returns:

  • result (OptimizerResult) – the result of the optimization

  • model (Model) – the best-fit model.