pygsti.extras.drift.trmodel
¶
Functions for Fourier analysis of equally spaced timeseries data
Module Contents¶
Classes¶
Encapsulates a basic form of timeresolved model, for implementing simple types of timeresolved characterization, 
Functions¶

The negative loglikelihood for a TimeResolvedModel given the timeseries data. 

Finds the maximum likelihood TimeResolvedModel given the data. 
 class pygsti.extras.drift.trmodel.TimeResolvedModel(hyperparameters, parameters)¶
Bases:
object
Encapsulates a basic form of timeresolved model, for implementing simple types of timeresolved characterization, e.g., timeresolved Ramsey spectroscopy. This object is a container for specifying a particular timeresolved model, which is achieved by defining the method probabilities. See the docstring of that method for further details.
This object is not intended to be used to encapsulate a timeresolved model that requires any intensive computations, e.g., a timeresolved process matrix model for full timeresolved GST. Instead, it is intend to be used for easy DIY timeresolved tomography on very simple models.
 set_parameters(self, parameters)¶
Sets the parameters of the model.
 parameters_copy(self)¶
Returns the parameters of the model.
 abstract probabilities(self, circuit, times)¶
* Specified in each derive class *
Specifying this method is the core to building a timeresolved model. This method should return the probabiilties for each outcome, for the input circuit at the specified times.
 Parameters
circuit (Circuit) – The circuit to return the probability trajectories for.
times (list) – The times to calculate the probabilities for.
 Returns
dict – A dictionary where the keys are the possible outcomes of the circuit, and the value for an outcome is a list of the probabilities to obtain that outcomes at the specified times (so this list is the same length as times).
 copy(self)¶
 pygsti.extras.drift.trmodel.negloglikelihood(trmodel, ds, minp=0, maxp=1)¶
The negative loglikelihood for a TimeResolvedModel given the timeseries data.
 Parameters
timeresolvedmodel (TimeResolvedModel) – The TimeResolvedModel to calculate the likelihood of.
ds (DataSet) – A DataSet, containing timeseries data.
minp (float, optional) – Value used to smooth the 0 and 1 probability boundaries for the likelihood function. To get the extact nll, leave as 0 and 1.
maxp (float, optional) – Value used to smooth the 0 and 1 probability boundaries for the likelihood function. To get the extact nll, leave as 0 and 1.
 Returns
float – The negative loglikelihood of the model.
 pygsti.extras.drift.trmodel.maxlikelihood(trmodel, ds, minp=0.0001, maxp=1  1e06, bounds=None, returnoptout=False, optoptions={}, verbosity=1)¶
Finds the maximum likelihood TimeResolvedModel given the data.
 Parameters
timeresolvedmodel (TimeResolvedModel) – The TimeResolvedModel that is used as the seed, and which defines the class of parameterized models to optimize over.
ds (DataSet) – A DataSet, containing timeseries data.
minp (float, optional) – Value used to smooth the 0 and 1 probability boundaries for the likelihood function.
maxp (float, optional) – Value used to smooth the 0 and 1 probability boundaries for the likelihood function.
bounds (list or None, optional) – Bounds on the parameters, as specified in scipy.optimize.minimize
optout (bool, optional) – Wether to return the output of scipy.optimize.minimize
optoptions (dict, optional) – Optional arguments for scipy.optimize.minimize.
 Returns
float – The maximum loglikelihood model