pygsti.modelpacks.GSTModelPack#
- class GSTModelPack#
Bases:
ModelPackABC for modelpacks with GST information
- _germs#
a list of “full” germ circuits, found by randomizing around the target model.
- Type:
list
- _germs_lite#
a list of “lite” germ circuits, found without randomizing around the target model.
- Type:
list
- _fiducials#
a list of the fiducial circuits in cases when the preparation and measurement fiducials are the same.
- Type:
list
- _prepfiducials#
the preparation fiducials.
- Type:
list
- _measfiducials#
the measurement fiducials.
- Type:
list
- global_fidpairs#
a list of 2-tuples of integers indexing _prepfiducials and _measfiducials respectively, giving a list of global fiducial-pair-reduction results for _germs.
- Type:
list
- global_fidpairs_lite#
a list of 2-tuples of integers indexing _prepfiducials and _measfiducials respectively, giving a list of global fiducial-pair-reduction results for _germs_lite.
- Type:
list
- _pergerm_fidpairsdict#
a dictionary with germ circuits (as tuples of labels) as keys and lists of 2-tuples as values. The 2-tuples contain integers indexing _prepfiducials and _measfiducials respectively, and together this dictionary gives per-germ FPR results for _germs.
- Type:
dict
- _pergerm_fidpairsdict_lite#
a dictionary with germ circuits (as tuples of labels) as keys and lists of 2-tuples as values. The 2-tuples contain integers indexing _prepfiducials and _measfiducials respectively, and together this dictionary gives per-germ FPR results for _germs_lite.
- Type:
dict
Methods
__init__()create_gst_circuitlists(max_max_length[, ...])Construct a
pygsti.objects.CircuitListfrom this modelpack.create_gst_circuits(max_max_length[, ...])Construct a
pygsti.objects.CircuitListfrom this modelpack.create_gst_experiment_design(max_max_length)Construct a
protocols.gst.StandardGSTDesignfrom this modelpackfiducials([qubit_labels])Returns the list of fiducial circuits for this model pack.
germs([qubit_labels, lite])Returns the list of germ circuits for this model pack.
get_gst_experiment_design(**kwargs)meas_fiducials([qubit_labels])Returns the list of measurement fiducials for this model pack.
pergerm_fidpair_dict([qubit_labels])Returns the per-germ fiducial pair reduction (FPR) dictionary for this model pack.
pergerm_fidpair_dict_lite([qubit_labels])Returns the per-germ fiducial pair reduction (FPR) dictionary for this model pack.
prep_fiducials([qubit_labels])Returns the list of preparation fiducials for this model pack.
processor_spec([qubit_labels])Create a processor specification for this model pack with the given qubit labels.
target_model([gate_type, prep_type, ...])Returns a copy of the target model in the given parameterization.
Attributes
descriptiongates- create_gst_circuitlists(max_max_length, qubit_labels=None, fpr=False, lite=True, **kwargs)#
Construct a
pygsti.objects.CircuitListfrom this modelpack.- Parameters:
max_max_length (number) – The greatest maximum-length to use. Equivalent to constructing a cicuit struct with a max_lengths list of powers of two less than or equal to the given value.
qubit_labels (tuple, optional) – A tuple of qubit labels. None means the integers starting at 0.
fpr (bool, optional) – Whether to reduce the number of sequences using fiducial pair reduction (FPR).
lite (bool, optional) – Whether to use a smaller “lite” list of germs. Unless you know you have a need to use the more pessimistic “full” set of germs, leave this set to True.
kwargs
-----
pygsti.circuits.create_lsgst_circuit_lists(... (This function invokes)
**kwargs).
arguments. (See that function's documentation for its accepted keyword)
- Return type:
list[class:pygsti.objects.CircuitList]
- create_gst_circuits(max_max_length, qubit_labels=None, fpr=False, lite=True, **kwargs)#
Construct a
pygsti.objects.CircuitListfrom this modelpack.- Parameters:
max_max_length (number) – The greatest maximum-length to use. Equivalent to constructing a cicuit struct with a max_lengths list of powers of two less than or equal to the given value.
qubit_labels (tuple, optional) – A tuple of qubit labels. None means the integers starting at 0.
fpr (bool, optional) – Whether to reduce the number of sequences using fiducial pair reduction (FPR).
lite (bool, optional) – Whether to use a smaller “lite” list of germs. Unless you know you have a need to use the more pessimistic “full” set of germs, leave this set to True.
- Return type:
class:pygsti.objects.CircuitList
- create_gst_experiment_design(max_max_length, qubit_labels=None, fpr=False, lite=True, **kwargs)#
Construct a
protocols.gst.StandardGSTDesignfrom this modelpack- Parameters:
max_max_length (number or list) – The greatest maximum-length to use. Equivalent to constructing a
StandardGSTDesignwith a max_lengths list of powers of two less than or equal to the given value. If a list is given, that this is treated as the raw list of maximum lengths, rather than just the maximum.qubit_labels (tuple, optional) – A tuple of qubit labels. None means the integers starting at 0.
fpr (bool, optional) – Whether to reduce the number of sequences using fiducial pair reduction (FPR).
lite (bool, optional) – Whether to use a smaller “lite” list of germs. Unless you know you have a need to use the more pessimistic “full” set of germs, leave this set to True.
- Return type:
- fiducials(qubit_labels=None)#
Returns the list of fiducial circuits for this model pack.
- Parameters:
qubit_labels (tuple, optional) – If not None, a tuple of the qubit labels to use in the returned circuits. If None, then the default labels are used, which are often the integers beginning with 0.
- Return type:
list of Circuits
- germs(qubit_labels=None, lite=True)#
Returns the list of germ circuits for this model pack.
- Parameters:
qubit_labels (tuple, optional) – If not None, a tuple of the qubit labels to use in the returned circuits. If None, then the default labels are used, which are often the integers beginning with 0.
lite (bool, optional) – Whether to return the “lite” set of germs, which amplifies all the errors of the target model to first order. Setting lite=False will result in more (significantly more in 2+ qubit cases) germs which are selected to amplify all the errors of even small deviations from the target model. Usually this added sensitivity is not worth the additional effort required to obtain data for the increased number of circuits, so the default is lite=True.
- Return type:
list of Circuits
- meas_fiducials(qubit_labels=None)#
Returns the list of measurement fiducials for this model pack.
- Parameters:
qubit_labels (tuple, optional) – If not None, a tuple of the qubit labels to use in the returned circuits. If None, then the default labels are used, which are often the integers beginning with 0.
- Return type:
list of Circuits
- pergerm_fidpair_dict(qubit_labels=None)#
Returns the per-germ fiducial pair reduction (FPR) dictionary for this model pack.
Note that these fiducial pairs correspond to the full (lite=False) set of germs.
- Parameters:
qubit_labels (tuple, optional) – If not None, a tuple of the qubit labels to use in the returned circuits. If None, then the default labels are used, which are often the integers beginning with 0.
- Return type:
dict
- pergerm_fidpair_dict_lite(qubit_labels=None)#
Returns the per-germ fiducial pair reduction (FPR) dictionary for this model pack.
Note that these fiducial pairs correspond to the lite set of germs.
- Parameters:
qubit_labels (tuple, optional) – If not None, a tuple of the qubit labels to use in the returned circuits. If None, then the default labels are used, which are often the integers beginning with 0.
- Return type:
dict
- prep_fiducials(qubit_labels=None)#
Returns the list of preparation fiducials for this model pack.
- Parameters:
qubit_labels (tuple, optional) – If not None, a tuple of the qubit labels to use in the returned circuits. If None, then the default labels are used, which are often the integers beginning with 0.
- Return type:
list of Circuits
- processor_spec(qubit_labels=None)#
Create a processor specification for this model pack with the given qubit labels.
- Parameters:
qubit_labels (tuple, optional) – A tuple of qubit labels, e.g. (‘Q0’, ‘Q1’) or (0, 1). The default are the integers starting at 0.
- Return type:
- target_model(gate_type='full', prep_type='auto', povm_type='auto', instrument_type='auto', simulator='auto', evotype='default', qubit_labels=None)#
Returns a copy of the target model in the given parameterization.
- Parameters:
parameterization_type ({"TP", "CPTP", "H+S", "S", ... }) – The gate and SPAM vector parameterization type. See
Model.set_all_parameterizations()for all allowed values.simulator (ForwardSimulator or {"auto", "matrix", "map"}) – The simulator (or type) to be used for model calculations (leave as “auto” if you’re not sure what this is).
qubit_labels (tuple, optional) – A tuple of qubit labels, e.g. (‘Q0’, ‘Q1’) or (0, 1). The default are the integers starting at 0.
evotype (Evotype or str, optional) – The evolution type of this model, describing how states are represented. The special value “default” is equivalent to specifying the value of pygsti.evotypes.Evotype.default_evotype.
- Return type: