-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #983 from qiboteam/protocol_docs
Protocol docs
- Loading branch information
Showing
10 changed files
with
252 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
Avoided crossing | ||
================ | ||
|
||
In the avoided crossing experiment the goal is to study the qubit-flux dependency | ||
of a couple of qubits to precisely tune the interaction between them at specific | ||
frequencies in order to calibrate the CZ and the iSWAP gates. | ||
|
||
In the avoided crossing experiment for CZ qubit gates, the interaction between | ||
two qubits is controlled by tuning their energy levels such that the :math:`\ket{11}` | ||
(both qubits in the excited state) and :math:`\ket{02}` (one qubit in the ground state and | ||
the other in the second excited state) states come into resonance. | ||
At this resonance point, the energy levels of these states experience an avoided | ||
crossing, a key phenomenon that enables the controlled-Z (CZ) gate operation. | ||
By observing the avoided crossing, one can confirm that the coupling between the | ||
qubits is strong enough to facilitate the necessary interaction for the CZ gate. | ||
Hence, precise tuning of these states is essential for achieving the correct gate | ||
operation. | ||
|
||
In the avoided crossing experiment for iSWAP qubit gates, the key focus is on | ||
the interaction between the :math:`\ket{10}` and :math:`\ket{01}` states. | ||
When tuning the qubits' energy levels, these two states come into resonance, | ||
creating an avoided crossing, which is the fundamental operation of | ||
the iSWAP gate. | ||
|
||
In this protocol, for each qubit pair we execute a qubit flux dependency of the | ||
01 and 02 transitions on the qubit with higher frequency and we fit the data to | ||
find the flux-frequency relationship that we use to estimate the bias needed to | ||
reach the CZ and iSWAP interaction points. | ||
|
||
Parameters | ||
^^^^^^^^^^ | ||
|
||
.. autoclass:: | ||
qibocal.protocols.flux_dependence.avoided_crossing.AvoidedCrossingParameters | ||
:noindex: | ||
|
||
Example | ||
^^^^^^^ | ||
|
||
It follows a runcard example of this experiment. | ||
|
||
.. code-block:: yaml | ||
- id: avoided crossing | ||
operation: avoided_crossing | ||
parameters: | ||
bias_step: 0.01 | ||
bias_width: 0.2 | ||
drive_amplitude: 0.5 | ||
freq_step: 500000 | ||
freq_width: 100000000 | ||
The expected output is the following: | ||
|
||
.. image:: avoided_crossing.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Readout mitigation matrix | ||
========================= | ||
|
||
The idea behind this protocol is that we can correct the qubit readout errors | ||
by applying a corrective linear transformation to the readout results, in formula | ||
|
||
.. math:: | ||
O_{noisy} = M O_{ideal}, | ||
where :math:`O_{noisy}` is the readout probabilities on the noisy device, | ||
:math:`O_{ideal}` is the expected one and :math:`M` is the readout mitigation matrix. | ||
The matrix :math:`M^{-1}` can be used to correct the noisy readouts. | ||
|
||
This protocol evaluates the readout matrix by preparing the qubit(s) in the | ||
computational base and measuring their states. | ||
|
||
Pramateters | ||
^^^^^^^^^^^ | ||
|
||
.. autoclass:: qibocal.protocols.readout_mitigation_matrix.ReadoutMitigationMatrixParameters | ||
:noindex: | ||
|
||
Example | ||
^^^^^^^ | ||
|
||
.. code-block:: yaml | ||
- id: readout_mitigation_matrix | ||
operation: readout_mitigation_matrix | ||
parameters: | ||
nshots: 1000 | ||
pulses: true | ||
After the protocol execution, the result is the following | ||
|
||
.. image:: readout_mitigation_matrix.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Readout optimization | ||
==================== | ||
|
||
Qibocal provides a protocol to improve the readout pulse amplitude by optimize | ||
the assignment fidelity. | ||
|
||
Parameters | ||
^^^^^^^^^^ | ||
|
||
.. autoclass:: qibocal.protocols.readout_optimization.resonator_amplitude.ResonatorAmplitudeParameters | ||
:noindex: | ||
|
||
|
||
Example | ||
^^^^^^^ | ||
|
||
It follows an example runcard of the resonator amplitude routine with the plot | ||
generated in the report. | ||
|
||
.. code-block:: yaml | ||
- id: resonator_amplitude | ||
operation: resonator_amplitude | ||
parameters: | ||
amplitude_step: 0.0005 | ||
amplitude_start: 0.001 | ||
amplitude_stop: 0.005 | ||
As shown in the picture below, the protocol sweeps the readout amplitude and evaluates | ||
the probability errors | ||
|
||
.. image:: readout_amplitude.png |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters