|
4 | 4 | "cell_type": "markdown", |
5 | 5 | "metadata": {}, |
6 | 6 | "source": [ |
7 | | - "<img src=\"../../../images/qiskit_header.png\" alt=\"Note: In order for images to show up in this jupyter notebook you need to select File => Trusted Notebook\" align=\"middle\">" |
| 7 | + "" |
8 | 8 | ] |
9 | 9 | }, |
10 | 10 | { |
|
13 | 13 | "source": [ |
14 | 14 | "# Non-Clifford CNOT-Dihedral Randomized Benchmarking\n", |
15 | 15 | "\n", |
16 | | - "- Last Updated: January 8, 2020\n", |
| 16 | + "- Last Updated: Feburary 19, 2020\n", |
17 | 17 | "- Requires: qiskit-terra 0.11, qiskit-ignis 0.3, qiskit-aer 0.3.4\n", |
18 | 18 | "\n", |
19 | 19 | "## Introduction\n", |
20 | 20 | "\n", |
21 | 21 | "**Non-Clifford CNOT-Dihedral Randomized Benchmarking** is a variant of the Randomized Benchmarking (RB) method that is used for benchmarking certain non-Clifford gates via randomization, taken from the so-called *CNOT-dihedral group* which is generated by CNOTs and a single qubit dihedral group $\\langle T, X \\rangle$.\n", |
22 | 22 | "The method is based on the paper \"Scalable randomized benchmarking of non-Clifford gates\"(https://arxiv.org/abs/1510.02720).\n", |
23 | 23 | "\n", |
24 | | - "This notebook gives an example for how to use the ``ignis.verification.randomized_benchmarking`` module in order to perform interleaved RB." |
| 24 | + "This notebook gives an example for how to use the ``ignis.verification.randomized_benchmarking`` module in order to perform interleaved RB.\n", |
| 25 | + "\n", |
| 26 | + "This notebook contains the following steps.\n", |
| 27 | + "\n", |
| 28 | + "1) Select the parameters for the non-Clifford CNOT-Dihedral RB and generate the RB sequences.\n", |
| 29 | + "\n", |
| 30 | + "2) Execute the RB circuits using Qiskit Aer Simulator (with some noise model).\n", |
| 31 | + "\n", |
| 32 | + "3) Fit the results and calculate the fidelity.\n", |
| 33 | + "\n", |
| 34 | + "4) Possible generalizations: generate non-Clifford CNOT-Dihedral RB sequences for interleaved RB and purity RB." |
25 | 35 | ] |
26 | 36 | }, |
27 | 37 | { |
|
48 | 58 | "cell_type": "markdown", |
49 | 59 | "metadata": {}, |
50 | 60 | "source": [ |
51 | | - "## Select the Parameters of the non-Clifford CNOT-Dihedral RB Run\n", |
| 61 | + "## 1.1) Select the parameters of the non-Clifford CNOT-Dihedral RB run\n", |
52 | 62 | "\n", |
53 | 63 | "First, we need to choose the regular RB parameters:\n", |
54 | 64 | "\n", |
|
91 | 101 | "cell_type": "markdown", |
92 | 102 | "metadata": {}, |
93 | 103 | "source": [ |
94 | | - "## Generate non-Clifford CNOT-Dihedral RB sequences\n", |
| 104 | + "## 1.2) Generate non-Clifford CNOT-Dihedral RB sequences\n", |
95 | 105 | "\n", |
96 | 106 | "We generate RB sequences. We start with a small example (so it doesn't take too long to run).\n", |
97 | 107 | "\n", |
|
226 | 236 | "cell_type": "markdown", |
227 | 237 | "metadata": {}, |
228 | 238 | "source": [ |
229 | | - "## Define the noise model\n", |
| 239 | + "## 2) Define the noise model and execute the RB circuits\n", |
230 | 240 | "\n", |
231 | 241 | "We define a noise model for the simulator. To simulate decay, we add depolarizing error probabilities to the CNOT and U gates." |
232 | 242 | ] |
|
340 | 350 | "cell_type": "markdown", |
341 | 351 | "metadata": {}, |
342 | 352 | "source": [ |
343 | | - "## Fit the results\n", |
| 353 | + "## 3) Fit the results\n", |
344 | 354 | "\n", |
345 | 355 | "We fit the results of the non-Clifford CNOT-Dihedral Z RB circuits and the non-Clifford CNOT-Dihedral X RB circuits into an exponentially decaying function and obtain the Errors per group element $\\alpha_Z$ and $\\alpha_R$ of the Z and X sequences respectively." |
346 | 356 | ] |
|
573 | 583 | "cell_type": "markdown", |
574 | 584 | "metadata": {}, |
575 | 585 | "source": [ |
576 | | - "## Generating interleaved non-Clifford cnot-dihedral sequences\n", |
| 586 | + "## 4.1) Generating interleaved non-Clifford cnot-dihedral sequences\n", |
577 | 587 | "\n", |
578 | 588 | "We provide the same parameters as before including a list of interleaved gated.\n", |
579 | 589 | "\n", |
|
815 | 825 | "cell_type": "markdown", |
816 | 826 | "metadata": {}, |
817 | 827 | "source": [ |
818 | | - "## Generating purity non-Clifford cnot-dihedral sequences\n", |
| 828 | + "## 4.2) Generating purity non-Clifford cnot-dihedral sequences\n", |
819 | 829 | "\n", |
820 | 830 | "We provide the same parameters as before and the following parameter for purity rb.\n", |
821 | 831 | "\n", |
|
889 | 899 | "source": [ |
890 | 900 | "print (rb_cnotdihedral_Z_circs[0][8][0])" |
891 | 901 | ] |
| 902 | + }, |
| 903 | + { |
| 904 | + "cell_type": "code", |
| 905 | + "execution_count": 1, |
| 906 | + "metadata": {}, |
| 907 | + "outputs": [ |
| 908 | + { |
| 909 | + "data": { |
| 910 | + "text/html": [ |
| 911 | + "<h3>Version Information</h3><table><tr><th>Qiskit Software</th><th>Version</th></tr><tr><td>Qiskit</td><td>0.15.0</td></tr><tr><td>Terra</td><td>0.12.0</td></tr><tr><td>Aer</td><td>0.4.0</td></tr><tr><td>Ignis</td><td>0.2.0</td></tr><tr><td>Aqua</td><td>0.6.4</td></tr><tr><td>IBM Q Provider</td><td>0.4.6</td></tr><tr><th>System information</th></tr><tr><td>Python</td><td>3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 19:07:31) \n", |
| 912 | + "[GCC 7.3.0]</td></tr><tr><td>OS</td><td>Linux</td></tr><tr><td>CPUs</td><td>8</td></tr><tr><td>Memory (Gb)</td><td>62.920127868652344</td></tr><tr><td colspan='2'>Wed Feb 19 09:42:39 2020 IST</td></tr></table>" |
| 913 | + ], |
| 914 | + "text/plain": [ |
| 915 | + "<IPython.core.display.HTML object>" |
| 916 | + ] |
| 917 | + }, |
| 918 | + "metadata": {}, |
| 919 | + "output_type": "display_data" |
| 920 | + }, |
| 921 | + { |
| 922 | + "data": { |
| 923 | + "text/html": [ |
| 924 | + "<div style='width: 100%; background-color:#d5d9e0;padding-left: 10px; padding-bottom: 10px; padding-right: 10px; padding-top: 5px'><h3>This code is a part of Qiskit</h3><p>© Copyright IBM 2017, 2020.</p><p>This code is licensed under the Apache License, Version 2.0. You may<br>obtain a copy of this license in the LICENSE.txt file in the root directory<br> of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.<p>Any modifications or derivative works of this code must retain this<br>copyright notice, and modified files need to carry a notice indicating<br>that they have been altered from the originals.</p></div>" |
| 925 | + ], |
| 926 | + "text/plain": [ |
| 927 | + "<IPython.core.display.HTML object>" |
| 928 | + ] |
| 929 | + }, |
| 930 | + "metadata": {}, |
| 931 | + "output_type": "display_data" |
| 932 | + } |
| 933 | + ], |
| 934 | + "source": [ |
| 935 | + "import qiskit.tools.jupyter\n", |
| 936 | + "%qiskit_version_table\n", |
| 937 | + "%qiskit_copyright" |
| 938 | + ] |
892 | 939 | } |
893 | 940 | ], |
894 | 941 | "metadata": { |
|
0 commit comments