pygsti.tools.optools.project_model

Contents

pygsti.tools.optools.project_model#

project_model(model, target_model, projectiontypes=('H', 'S', 'H+S', 'LND'), gen_type='logG-logT', logG_weight=None)#

Construct a new model(s) by projecting the error generator of model onto some sub-space then reconstructing.

Parameters:
  • model (Model) – The model whose error generator should be projected.

  • target_model (Model) – The set of target (ideal) gates.

  • projectiontypes (tuple of {'H','S','H+S','LND','LNDF'}) –

    Which projections to use. The length of this tuple gives the number of Model objects returned. Allowed values are:

    • ’H’ = Hamiltonian errors

    • ’S’ = Stochastic Pauli-channel errors

    • ’H+S’ = both of the above error types

    • ’LND’ = errgen projected to a normal (CPTP) Lindbladian

    • ’LNDF’ = errgen projected to an unrestricted (full) Lindbladian

  • gen_type ({"logG-logT", "logTiG", "logGTi"}) – The type of error generator to compute. For more details, see func:error_generator.

  • logG_weight (float or None (default)) – Regularization weight for approximate logG in logG-logT generator. For more details, see func:error_generator.

Returns:

  • projected_models (list of Models) – Elements are projected versions of model corresponding to the elements of projectiontypes.

  • Nps (list of parameter counts) – Integer parameter counts for each model in projected_models. Useful for computing the expected log-likelihood or chi2.