Skip to content

Commit

Permalink
docs: write standard rb docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Edoardo-Pedicillo committed Sep 27, 2024
1 parent 7985fb1 commit b819c69
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/source/protocols/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ In this section we introduce the basics of all protocols supported by ``qibocal`
readout_mitigation_matrix
avoided_crossing
readout_optimization
standard_rb
references
Binary file added doc/source/protocols/standard_rb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 85 additions & 0 deletions doc/source/protocols/standard_rb.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
Standard Randomize Benchmarking
===============================

An approach to obtain the average gate fidelity is to perform randomized
benchmarking :cite:p:`Emerson_2005`.
The key idea is that if we average the error process over the uniform space of
unitaries the result is a depolarizing channel that maps any pure state to the
maximally mixed state.
Such uniform space of unitaries is known as *Haar measure*.
It can be shown :cite:p:`Emerson_2005` that the average induced error is proportional
to the depolarization probability.
However, this approach is inefficient because we sample randomly from the Haar measure.
A simplification was proposed in :cite:p:`Knill2008` by restricting the unitaries
to the Clifford group, which consists of unitary rotations mapping the group
of Pauli operators in itself.
Among the advantages of such group are the fact of the number of Clifford
gates is finite given the Hilbert space and being a group we can easily found
the inverse within the group.
The generic procedure to perform a randomized benchmarking is the following:

1. initialize the system in ground state
2. for each sequence length :math:`m` draw sequence of Clifford group elements
3. calculate inverse gate
4. measure sequence and inverse gate
5. repeat the process for multiple sequence of same length and varying the length

The previous approach works because it has been shown :cite:p:`Nielsen_2002` that
randomization with Clifford gates provides again a depolarized noise channel

.. math::
:name: eq:1
\rho \rightarrow \frac{d}{2} I + ( 1 - d) \rho
with depolarization probability :math:`d`.
If we follow the previous procedure and we measure the survival probability, i.e.
the probability of measuring the qubit in :math:`\ket{0}`, for
different sequence length :math:`m` we expect the following behavior

.. math::
:name: eq:2
F(m) = A p^m + B
where :math:`1-p` is the rate of depolarization while :math:`A` and :math:`B`
capture state preparation and measurement errors.
Finally, we can extract the average error per Clifford as

.. math::
:name: eq:3
\epsilon_\text{Clifford} = \frac{1 - p}{1 - 2^{-n}}
where :math:`n` is the number of qubits. The error per gate can be derived by dividing
the Clifford error by the physical gates per Clifford which usually is 1.875.
One of the main feature of RB is the possibility to estimate the gate fidelity
alone without taking into account both state preparation and measurement errors
which can be computed using the :math:`A` and :math:`B` terms in :ref:`Eq. 2 <eq:2>`.

Parameters
^^^^^^^^^^


.. autoclass::
qibocal.protocols.randomized_benchmarking.standard_rb.StandardRBParameters
:noindex:


Example
^^^^^^^

It follows a runcard where we execute a standard RB.

.. code-block:: yaml
- id: standard rb
operation: standard_rb
parameters:
depths: [1,5,10,20,50,100]
niter: 20
nshots: 100
The expected output is the following:

.. image:: standard_rb.png
40 changes: 40 additions & 0 deletions doc/source/refs.bib
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,43 @@ @misc{pedicillo2023
archivePrefix={arXiv},
primaryClass={id='quant-ph' full_name='Quantum Physics' is_active=True alt_name=None in_archive='quant-ph' is_general=False description=None}
}

@article{Knill2008,
title={Randomized benchmarking of quantum gates},
volume={77},
ISSN={1094-1622},
url={http://dx.doi.org/10.1103/PhysRevA.77.012307},
DOI={10.1103/physreva.77.012307},
number={1},
journal={Physical Review A},
publisher={American Physical Society (APS)},
author={Knill, E. and Leibfried, D. and Reichle, R. and Britton, J. and Blakestad, R. B. and Jost, J. D. and Langer, C. and Ozeri, R. and Seidelin, S. and Wineland, D. J.},
year={2008},
month={jan},
}

@article{Emerson_2005,
title={Scalable noise estimation with random unitary operators},
volume={7},
ISSN={1741-3575},
url={http://dx.doi.org/10.1088/1464-4266/7/10/021},
DOI={10.1088/1464-4266/7/10/021},
number={10},
journal={Journal of Optics B: Quantum and Semiclassical Optics},
publisher={IOP Publishing},
author={Emerson, Joseph and Alicki, Robert and Życzkowski, Karol},
year={2005},
month=sep, pages={S347–S352} }

@article{Nielsen_2002,
title={A simple formula for the average gate fidelity of a quantum dynamical operation},
volume={303},
ISSN={0375-9601},
url={http://dx.doi.org/10.1016/S0375-9601(02)01272-0},
DOI={10.1016/s0375-9601(02)01272-0},
number={4},
journal={Physics Letters A},
publisher={Elsevier BV},
author={Nielsen, Michael A},
year={2002},
month=oct, pages={249–252} }

0 comments on commit b819c69

Please sign in to comment.