201 lines
11 KiB
Plaintext
201 lines
11 KiB
Plaintext
---
|
||
title: InterleavedRBFitter (v0.26)
|
||
description: API reference for qiskit.ignis.verification.InterleavedRBFitter in qiskit v0.26
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.ignis.verification.InterleavedRBFitter
|
||
---
|
||
|
||
<span id="qiskit-ignis-verification-interleavedrbfitter" />
|
||
|
||
# qiskit.ignis.verification.InterleavedRBFitter
|
||
|
||
<Class id="qiskit.ignis.verification.InterleavedRBFitter" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-ignis/tree/stable/0.6/qiskit/ignis/verification/randomized_benchmarking/fitters.py" signature="InterleavedRBFitter(original_result, interleaved_result, cliff_lengths, rb_pattern=None)" modifiers="class">
|
||
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.
|
||
|
||
### \_\_init\_\_
|
||
|
||
<Function id="qiskit.ignis.verification.InterleavedRBFitter.__init__" signature="__init__(original_result, interleaved_result, cliff_lengths, rb_pattern=None)">
|
||
**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.
|
||
</Function>
|
||
|
||
## Methods
|
||
|
||
| | |
|
||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||
| [`__init__`](#qiskit.ignis.verification.InterleavedRBFitter.__init__ "qiskit.ignis.verification.InterleavedRBFitter.__init__")(original\_result, …\[, rb\_pattern]) | **param original\_result**list of results of the |
|
||
| [`add_data`](#qiskit.ignis.verification.InterleavedRBFitter.add_data "qiskit.ignis.verification.InterleavedRBFitter.add_data")(new\_original\_result, …\[, rerun\_fit]) | Add a new result. |
|
||
| [`calc_data`](#qiskit.ignis.verification.InterleavedRBFitter.calc_data "qiskit.ignis.verification.InterleavedRBFitter.calc_data")() | Retrieve probabilities of success from execution results. |
|
||
| [`calc_statistics`](#qiskit.ignis.verification.InterleavedRBFitter.calc_statistics "qiskit.ignis.verification.InterleavedRBFitter.calc_statistics")() | Extract averages and std dev. |
|
||
| [`fit_data`](#qiskit.ignis.verification.InterleavedRBFitter.fit_data "qiskit.ignis.verification.InterleavedRBFitter.fit_data")() | Fit the interleaved RB results. |
|
||
| [`fit_data_pattern`](#qiskit.ignis.verification.InterleavedRBFitter.fit_data_pattern "qiskit.ignis.verification.InterleavedRBFitter.fit_data_pattern")(patt\_ind, fit\_guess\[, …]) | Fit the RB results of a particular pattern to an exponential curve. |
|
||
| [`plot_rb_data`](#qiskit.ignis.verification.InterleavedRBFitter.plot_rb_data "qiskit.ignis.verification.InterleavedRBFitter.plot_rb_data")(\[pattern\_index, ax, add\_label, …]) | Plot interleaved randomized benchmarking data of a single pattern. |
|
||
|
||
## Attributes
|
||
|
||
| | |
|
||
| --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
|
||
| [`cliff_lengths`](#qiskit.ignis.verification.InterleavedRBFitter.cliff_lengths "qiskit.ignis.verification.InterleavedRBFitter.cliff_lengths") | Return clifford lengths. |
|
||
| [`fit`](#qiskit.ignis.verification.InterleavedRBFitter.fit "qiskit.ignis.verification.InterleavedRBFitter.fit") | Return fit as a 2 element list. |
|
||
| [`fit_int`](#qiskit.ignis.verification.InterleavedRBFitter.fit_int "qiskit.ignis.verification.InterleavedRBFitter.fit_int") | Return interleaved fit parameters. |
|
||
| [`raw_data`](#qiskit.ignis.verification.InterleavedRBFitter.raw_data "qiskit.ignis.verification.InterleavedRBFitter.raw_data") | Return raw\_data as a 2 element list. |
|
||
| [`rb_fit_fun`](#qiskit.ignis.verification.InterleavedRBFitter.rb_fit_fun "qiskit.ignis.verification.InterleavedRBFitter.rb_fit_fun") | Return the fit function rb\_fit\_fun. |
|
||
| [`rbfit_int`](#qiskit.ignis.verification.InterleavedRBFitter.rbfit_int "qiskit.ignis.verification.InterleavedRBFitter.rbfit_int") | Return the interleaved RB fitter. |
|
||
| [`rbfit_std`](#qiskit.ignis.verification.InterleavedRBFitter.rbfit_std "qiskit.ignis.verification.InterleavedRBFitter.rbfit_std") | Return the original RB fitter. |
|
||
| [`results`](#qiskit.ignis.verification.InterleavedRBFitter.results "qiskit.ignis.verification.InterleavedRBFitter.results") | Return all the results as a 2 element list. |
|
||
| [`seeds`](#qiskit.ignis.verification.InterleavedRBFitter.seeds "qiskit.ignis.verification.InterleavedRBFitter.seeds") | Return the number of loaded seeds as a 2 element list. |
|
||
| [`ydata`](#qiskit.ignis.verification.InterleavedRBFitter.ydata "qiskit.ignis.verification.InterleavedRBFitter.ydata") | Return ydata (means and std devs) as a 2 element list. |
|
||
|
||
### add\_data
|
||
|
||
<Function id="qiskit.ignis.verification.InterleavedRBFitter.add_data" signature="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="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="calc_statistics()">
|
||
Extract averages and std dev.
|
||
|
||
Output \[ydata\_original, ydata\_interleaved]
|
||
</Function>
|
||
|
||
### 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\_data
|
||
|
||
<Function id="qiskit.ignis.verification.InterleavedRBFitter.fit_data" signature="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="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>
|
||
|
||
### fit\_int
|
||
|
||
<Attribute id="qiskit.ignis.verification.InterleavedRBFitter.fit_int">
|
||
Return interleaved fit parameters.
|
||
</Attribute>
|
||
|
||
### plot\_rb\_data
|
||
|
||
<Function id="qiskit.ignis.verification.InterleavedRBFitter.plot_rb_data" signature="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>
|
||
|
||
### 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>
|
||
|