qiskit-documentation/docs/api/qiskit/0.36/qiskit.ignis.verification.I...

167 lines
5.9 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: InterleavedRBFitter
description: API reference for qiskit.ignis.verification.InterleavedRBFitter
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.ignis.verification.InterleavedRBFitter
---
# InterleavedRBFitter
<Class id="qiskit.ignis.verification.InterleavedRBFitter" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-ignis/tree/stable/0.7/qiskit/ignis/verification/randomized_benchmarking/fitters.py" signature="InterleavedRBFitter(original_result, interleaved_result, cliff_lengths, rb_pattern=None)" modifiers="class">
Bases: `qiskit.ignis.verification.randomized_benchmarking.fitters.RBFitterBase`
Class for fitters for interleaved RB, derived from RBFitterBase class.
Contains two RBFitter objects: the original RBFitter and the interleaved RBFitter.
**Parameters**
* **original\_result** (*list*) list of results of the original RB sequence (qiskit.Result).
* **interleaved\_result** (*list*) list of results of the interleaved RB sequence (qiskit.Result).
* **cliff\_lengths** (*list*) the Clifford lengths, 2D list i x j where i is the number of patterns, j is the number of cliffords lengths.
* **rb\_pattern** (*list*) the pattern for the RB sequences.
## Methods
### add\_data
<Function id="qiskit.ignis.verification.InterleavedRBFitter.add_data" signature="InterleavedRBFitter.add_data(new_original_result, new_interleaved_result, rerun_fit=True)">
Add a new result.
**Parameters**
* **new\_original\_result** (*list*) list of RB results of the original circuits.
* **new\_interleaved\_result** (*list*) list of RB results of the interleaved circuits.
* **rerun\_fit** (*bool*) re-calculate the means and fit the result.
#### Additional information:
Assumes that the executed result is the output of circuits generated by randomized\_benchmarking\_seq.
</Function>
### calc\_data
<Function id="qiskit.ignis.verification.InterleavedRBFitter.calc_data" signature="InterleavedRBFitter.calc_data()">
Retrieve probabilities of success from execution results.
Outputs results into an internal variables: \_raw\_original\_data and \_raw\_interleaved\_data
</Function>
### calc\_statistics
<Function id="qiskit.ignis.verification.InterleavedRBFitter.calc_statistics" signature="InterleavedRBFitter.calc_statistics()">
Extract averages and std dev.
Output \[ydata\_original, ydata\_interleaved]
</Function>
### fit\_data
<Function id="qiskit.ignis.verification.InterleavedRBFitter.fit_data" signature="InterleavedRBFitter.fit_data()">
Fit the interleaved RB results. Fit each of the patterns.
According to the paper: “Efficient measurement of quantum gate error by interleaved randomized benchmarking” (arXiv:1203.4550) - Equations (4) and (5).
Puts the results into a list of fit dictionaries: where each dictionary corresponds to a pattern and has fields:
> * epc\_est - the estimated error per the interleaved Clifford.
> * epc\_est\_error - the estimated error derived from the params\_err.
> * systematic\_err - systematic error bound of epc\_est.
> * systematic\_err\_L = epc\_est - systematic\_err (left error bound).
> * systematic\_err\_R = epc\_est + systematic\_err (right error bound).
</Function>
### fit\_data\_pattern
<Function id="qiskit.ignis.verification.InterleavedRBFitter.fit_data_pattern" signature="InterleavedRBFitter.fit_data_pattern(patt_ind, fit_guess, fit_index=0)">
Fit the RB results of a particular pattern to an exponential curve.
**Parameters**
* **patt\_ind** (*int*) index of the data to fit.
* **fit\_guess** (*list*) guess values for the fit.
* **fit\_index** (*int*) 0 fit the standard data, 1 fit the interleaved data.
</Function>
### plot\_rb\_data
<Function id="qiskit.ignis.verification.InterleavedRBFitter.plot_rb_data" signature="InterleavedRBFitter.plot_rb_data(pattern_index=0, ax=None, add_label=True, show_plt=True)">
Plot interleaved randomized benchmarking data of a single pattern.
**Parameters**
* **pattern\_index** (*int*) which RB pattern to plot.
* **ax** (*Axes*) plot axis (if passed in).
* **add\_label** (*bool*) Add an EPC label.
* **show\_plt** (*bool*) display the plot.
**Raises**
**ImportError** if matplotlib is not installed.
</Function>
## Attributes
### cliff\_lengths
<Attribute id="qiskit.ignis.verification.InterleavedRBFitter.cliff_lengths">
Return clifford lengths.
</Attribute>
### fit
<Attribute id="qiskit.ignis.verification.InterleavedRBFitter.fit">
Return fit as a 2 element list.
</Attribute>
### fit\_int
<Attribute id="qiskit.ignis.verification.InterleavedRBFitter.fit_int">
Return interleaved fit parameters.
</Attribute>
### raw\_data
<Attribute id="qiskit.ignis.verification.InterleavedRBFitter.raw_data">
Return raw\_data as a 2 element list.
</Attribute>
### rb\_fit\_fun
<Attribute id="qiskit.ignis.verification.InterleavedRBFitter.rb_fit_fun">
Return the fit function rb\_fit\_fun.
</Attribute>
### rbfit\_int
<Attribute id="qiskit.ignis.verification.InterleavedRBFitter.rbfit_int">
Return the interleaved RB fitter.
</Attribute>
### rbfit\_std
<Attribute id="qiskit.ignis.verification.InterleavedRBFitter.rbfit_std">
Return the original RB fitter.
</Attribute>
### results
<Attribute id="qiskit.ignis.verification.InterleavedRBFitter.results">
Return all the results as a 2 element list.
</Attribute>
### seeds
<Attribute id="qiskit.ignis.verification.InterleavedRBFitter.seeds">
Return the number of loaded seeds as a 2 element list.
</Attribute>
### ydata
<Attribute id="qiskit.ignis.verification.InterleavedRBFitter.ydata">
Return ydata (means and std devs) as a 2 element list.
</Attribute>
</Class>