pygsti.algorithms.gaugeopt.gaugeopt_to_target#
- gaugeopt_to_target(model, target_model, *args, **kwargs)#
Legacy function to optimize the gauge degrees of freedom of a model to that of a target.
Use of more than two positional arguments is deprecated; keyword arguments should be used instead. See the GaugeoptToTargetArgs class for available keyword arguments and their default values.
- Returns:
model (if kwargs.get(‘return_all’, False) == False)
(goodnessMin, gaugeMx, model) (if kwargs.get(‘return_all’, False) == True) – Where goodnessMin is the minimum value of the goodness function (the best ‘goodness’) found, gaugeMx is the gauge matrix used to transform the model, and model is the final gauge-transformed model.
Notes
- This function handles a strange situation where target_model can be None. In this case,
the objective will only depend on cptp_penality_factor and spam_penalty_factor;
it’s forbidden to use method == ‘ls’, and
the returned OpModel might not have its basis set.