pygsti.extras.rb.dataset
Encapsulates RB results and dataset objects
Module Contents
Classes
An object to summarize the results of RB experiments as relevant to implementing a standard RB analysis on the data. 
Functions

todo 
 pygsti.extras.rb.dataset.create_summary_datasets(ds, spec, datatype='adjusted', verbosity=1)
todo
 class pygsti.extras.rb.dataset.RBSummaryDataset(num_qubits, success_counts=None, total_counts=None, hamming_distance_counts=None, aux=None, finitecounts=True, descriptor='')
Bases:
object
An object to summarize the results of RB experiments as relevant to implementing a standard RB analysis on the data. This dataset type only records the “RB length” of a circuit, how many times the circuit resulted in “success”, and, optionally, some basic circuit information that can be helpful in understandingthe results. I.e., it doesn’t store all the details about the circuits and the counts for each circuit (use a standard DataSet object to store the entire output of RB experiments).
# todo : update.
Initialize an RB summary dataset.
Parameters
 num_qubitsint
The number of qubits the dataset is for. This should be the number of qubits the RB experiments where “holistically” performed on. So, this dataset type is not suitable for, e.g., a full set of simultaneous RB data, which consists of parallel RB on different qubits. Data of that sort can be input into multiple RBSummaryDataset objects.
 lengthslist of ints
A list of the “RB lengths” that the data is for. I.e., these are the “m” values in Pm = A + Bp^m. E.g., for direct RB this should be the number of circuit layers of native gates in the “core” circuit (i.e., not including the prep/measure stabilizer circuits). For Clifford RB this should be the number of Cliffords in the circuit (+ an arbitrary constant, traditionally 1, but 2 is more consistent with direct RB and is the pyGSTi convention for generating CRB circuits) before it is compiled into the native gates. This can always be the length value used to generate the circuit, if a pyGSTi RB circuit/experiment generation function was used to generate the circuit.
This list should be the same length as the input results data (e.g., success_counts below). If sortedinput is False (the default), it is a list that has an entry for each circuit run (so values can appear multiple times in the list and in any order). If sortedinput is True is an ordered list containing each and every RB length once.
 success_countslist of ints, or list of list of ints, optional
Success counts, i.e., the number of times a circuit returns the “success” result. Normally this should be a list containing ints with success_counts[i] containing the success counts for a circuit with RB length length[i]. This is the case when sortedinput is False. But, if sortedinput is True, it is instead a list of lists of ints: the list at success_counts[i] contains the data for all circuits with RB length lengths[i] (in this case lengths is an ordered list containing each RB length once). success_counts can be None, and the data can instead be specified via success_probabilities. But, inputing the data as success counts is the preferred option for experimental data.
 total_countsint, or list of ints, or list of list of ints, optional
If not None, an int that specifies the total number of counts per circuit or a list that specifies the total counts for each element in success_counts (or success_probabilities). This is not optional if success_counts is provided, and should always be specified with experimental data.
 success_probabilitieslist of floats, or list of list of floats, optional
The same as success_counts except that this list specifies observed survival probabilities, rather than the number of success counts. Can only be specified if success_counts is None, and it is better to input experimental data as success_counts (but this option is useful for finitesamplingfree simulated data).
 circuit_depthslist of ints, or list of list of ints, optional
Has same format has success_counts or success_probabilities. Contains circuit depths. This is additional auxillary information that it is often useful to have when analyzing data from any type of RB that includes any compilation (e.g., Clifford RB). But this is not essential.
 circuit_twoQgate_countslist of ints, or list of list of ints, optional
Has same format has success_counts or success_probabilities. Contains circuit 2qubit gate counts. This is additional auxillary information that it is often useful for interpretting RB results.
 descriptorstr, optional
A string that describes what the data is for.
 adjusted_success_probability(length, index)
todo.
 success_counts(length, index)
todo
 total_counts(length, index)
todo
 hamming_distance_distribution(length, index)
todo
 success_probabilities(successtype='raw')
todo.