AccreditationFitter
class AccreditationFitter
Bases: object
Class for fitters for accreditation
Implementation follows the methods from [1] FullAccreditation and [2] MeanAccreditation.
Data can be input either as qiskit result objects, or as lists of bitstrings (the latter is useful for batch jobs).
References
- S. Ferracin, T. Kapourniotis, A. Datta. Accrediting outputs of noisy intermediate-scale quantum computing devices, New Journal of Physics, Volume 21, 113038. (2019). NJP 113038
- S. Ferracin, S. Merkel, D. McKay, A. Datta. Experimental accreditation of outputs of noisy quantum computers, arxiv:2103.06603 (2021). arXiv:quant-ph/2103.06603
Methods
AppendResults
AccreditationFitter.AppendResults(results, postp_list, v_zero)
Single run of accreditation protocol, data input as qiskit result object assumed to be single shot
Parameters
- results (Result) – results of the quantum job
- postp_list (list) – list of strings used to post-process outputs
- v_zero (int) – position of target
Raises
QiskitError – If the data is not single shot
AppendStrings
AccreditationFitter.AppendStrings(strings, postp_list, v_zero)
Single run of accreditation protocol, data input as a list of output strings
Parameters
- strings (list) – stringlist of outputs
- postp_list (list) – list of strings used to post-process outputs
- v_zero (int) – position of target
FullAccreditation
AccreditationFitter.FullAccreditation(confidence)
This function computes the bound on variation distance based and the confidence interval desired. This protocol is from [1] and fully treats non-Markovian errors
Parameters
confidence (float) – number between 0 and 1
Returns
dict of postselected target counts float: 1-norm bound from noiseless samples float: confidence
Return type
dict
Raises
QiskitError – If no runs are accepted or confidence is outside of 0,1
MeanAccreditation
AccreditationFitter.MeanAccreditation(confidence)
This function computes the bound on variation distance based and the confidence interval desired. This protocol is from [2] and assumes Markovianity but gives an improved bound
Parameters
confidence (float) – number between 0 and 1
Returns
dict of corrected target counts float: 1-norm bound from noiseless samples float: confidence
Return type
dict
Reset
AccreditationFitter.Reset()
Reset the accreditation class object
bound_variation_distance
AccreditationFitter.bound_variation_distance(theta)
DEPRECATED-This function computes the bound on variation distance based and the confidence :param theta: number between 0 and 1 :type theta: float
Raises
QiskitError – If there is not an accepted run
single_protocol_run
AccreditationFitter.single_protocol_run(results, postp_list, v_zero)
DEPRECATED-Single protocol run of accreditation protocol :param results: results of the quantum job :type results: Result :param postp_list: list of strings used to post-process outputs :type postp_list: list :param v_zero: position of target :type v_zero: int
Raises
QiskitError – If the number of circuits is inconsistent or if there are not at least 3 traps or if the data is not single shot